Skip to content

Commit

Permalink
make argument optional
Browse files Browse the repository at this point in the history
  • Loading branch information
zweckj committed Nov 7, 2024
1 parent 0e4dd57 commit 9164a2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions pyacaia_async/acaiascale.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9164a2d

Please sign in to comment.