From 9164a2dffa682733f682ac7c63200dc3ad8f90a8 Mon Sep 17 00:00:00 2001 From: Josef Zweck <24647999+zweckj@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:16:52 +0100 Subject: [PATCH] make argument optional --- pyacaia_async/acaiascale.py | 10 +++++++--- setup.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pyacaia_async/acaiascale.py b/pyacaia_async/acaiascale.py index f4d494c..9bc52f4 100644 --- a/pyacaia_async/acaiascale.py +++ b/pyacaia_async/acaiascale.py @@ -125,13 +125,15 @@ def timer(self) -> int: return int(self._timer_stop - self._timer_start) def device_disconnected_handler( - self, client: BleakClient, notify: bool = True + self, + client: BleakClient | None = None, # pylint: disable=unused-argument + notify: bool = True, ) -> None: """Callback for device disconnected.""" _LOGGER.debug( "Scale with address %s disconnected through disconnect handler", - client.address, + self.mac, ) self.timer_running = False self.connected = False @@ -379,7 +381,9 @@ async def reset_timer(self) -> None: self._timer_start = time.time() async def on_bluetooth_data_received( - self, characteristic: BleakGATTCharacteristic, data: bytearray + self, + characteristic: BleakGATTCharacteristic, # pylint: disable=unused-argument + data: bytearray, ) -> None: """Receive data from scale.""" msg = decode(data)[0] diff --git a/setup.py b/setup.py index 6b1bd5a..4608f23 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyacaia_async", - version="0.0.12b5", + version="0.0.12b6", description="An async implementation of PyAcaia", long_description=readme, long_description_content_type="text/markdown",