From b61110c15448af8a9bfd297342474ebfd88ce1dc Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 28 Sep 2022 22:16:35 +1300 Subject: [PATCH] linting etc --- aioesphomeapi/client.py | 7 ++++--- aioesphomeapi/core.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/aioesphomeapi/client.py b/aioesphomeapi/client.py index 092e81c..c8454e3 100644 --- a/aioesphomeapi/client.py +++ b/aioesphomeapi/client.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines import asyncio import logging from typing import ( @@ -22,8 +23,8 @@ from .api_pb2 import ( # type: ignore BluetoothConnectionsFreeResponse, BluetoothDeviceConnectionResponse, BluetoothDeviceRequest, - BluetoothGATTGetServicesRequest, BluetoothGATTGetServicesDoneResponse, + BluetoothGATTGetServicesRequest, BluetoothGATTGetServicesResponse, BluetoothGATTNotifyDataResponse, BluetoothGATTNotifyRequest, @@ -497,7 +498,7 @@ class APIClient: async def bluetooth_gatt_get_services(self, address: int) -> BluetoothGATTServices: self._check_authenticated() - def do_append(msg: message.Message) -> None: + def do_append(msg: message.Message) -> bool: return isinstance(msg, BluetoothGATTGetServicesResponse) def do_stop(msg: message.Message) -> bool: @@ -612,7 +613,7 @@ class APIClient: address: int, handle: int, on_bluetooth_gatt_notify: Callable[[int, bytearray], None], - ) -> Coroutine[Any, Any, None]: + ) -> Callable[[], Coroutine[Any, Any, None]]: self._check_authenticated() def on_msg(msg: message.Message) -> None: diff --git a/aioesphomeapi/core.py b/aioesphomeapi/core.py index d8f509d..1875aaa 100644 --- a/aioesphomeapi/core.py +++ b/aioesphomeapi/core.py @@ -3,8 +3,8 @@ from .api_pb2 import ( # type: ignore BluetoothConnectionsFreeResponse, BluetoothDeviceConnectionResponse, BluetoothDeviceRequest, - BluetoothGATTGetServicesRequest, BluetoothGATTGetServicesDoneResponse, + BluetoothGATTGetServicesRequest, BluetoothGATTGetServicesResponse, BluetoothGATTNotifyDataResponse, BluetoothGATTNotifyRequest,