Skip to content

Commit 6a97023

Browse files
author
Rich Saupe
committed
refactor: adds type annotations reported by mypy and updated pylint version in .pre-commit-config.yaml
1 parent 53e7c34 commit 6a97023

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
2020
- repo: https://github.com/pycqa/pylint
21-
rev: v2.11.1
21+
rev: v2.12.2
2222
hooks:
2323
- id: pylint
2424
name: pylint (library code)

adafruit_ble_ibbq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class _SettingsResult(ComplexCharacteristic):
4141
def __init__(self):
4242
super().__init__(properties=Characteristic.NOTIFY)
4343

44-
def bind(self, service):
44+
def bind(self, service: Service) -> _bleio.PacketBuffer:
4545
"""Bind to an IBBQService."""
4646
bound_characteristic = super().bind(service)
4747
bound_characteristic.set_cccd(notify=True)
@@ -57,7 +57,7 @@ class _RealtimeData(ComplexCharacteristic):
5757
def __init__(self):
5858
super().__init__(properties=Characteristic.NOTIFY)
5959

60-
def bind(self, service):
60+
def bind(self, service: Service) -> _bleio.PacketBuffer:
6161
"""Bind to an IBBQService."""
6262
bound_characteristic = super().bind(service)
6363
bound_characteristic.set_cccd(notify=True)
@@ -74,7 +74,7 @@ class IBBQService(Service):
7474
_UNITS_CELSIUS_MSG = b"\x02\x00\x00\x00\x00\x00"
7575
_REQUEST_BATTERY_LEVEL_MSG = b"\x08\x24\x00\x00\x00\x00"
7676

77-
def __init__(self, service=None):
77+
def __init__(self, service: Service = None) -> None:
7878
super().__init__(service=service)
7979
# Defer creating buffers until needed, since MTU is not known yet.
8080
self._settings_result_buf = None

0 commit comments

Comments
 (0)