From 1b8544385c3e38ac01b0168cf6de4d2961f305d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 11 Aug 2024 06:39:01 -0500 Subject: [PATCH] Bump mypy from 1.10.1 to 1.11.1 (#913) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston --- aioesphomeapi/client.py | 2 +- aioesphomeapi/client_callbacks.py | 2 +- aioesphomeapi/connection.py | 4 ++-- requirements_test.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aioesphomeapi/client.py b/aioesphomeapi/client.py index 558ae0a2..068e8a61 100644 --- a/aioesphomeapi/client.py +++ b/aioesphomeapi/client.py @@ -328,7 +328,7 @@ def _on_stop( async def start_connection( self, - on_stop: Callable[[bool], Awaitable[None]] | None = None, + on_stop: Callable[[bool], Coroutine[Any, Any, None]] | None = None, ) -> None: """Start connecting to the device.""" if self._connection is not None: diff --git a/aioesphomeapi/client_callbacks.py b/aioesphomeapi/client_callbacks.py index 18e7632a..4f36c7a9 100644 --- a/aioesphomeapi/client_callbacks.py +++ b/aioesphomeapi/client_callbacks.py @@ -130,7 +130,7 @@ def on_bluetooth_handle_message( def on_bluetooth_message_types( address: int, - msg_types: tuple[type[message.Message]], + msg_types: tuple[type[message.Message], ...], msg: ( BluetoothGATTErrorResponse | BluetoothGATTNotifyResponse diff --git a/aioesphomeapi/connection.py b/aioesphomeapi/connection.py index f3a80039..65acf680 100644 --- a/aioesphomeapi/connection.py +++ b/aioesphomeapi/connection.py @@ -218,12 +218,12 @@ class APIConnection: def __init__( self, params: ConnectionParams, - on_stop: Callable[[bool], None], + on_stop: Callable[[bool], None] | None, debug_enabled: bool, log_name: str | None, ) -> None: self._params = params - self.on_stop: Callable[[bool], None] | None = on_stop + self.on_stop = on_stop self._socket: socket.socket | None = None self._frame_helper: None | APINoiseFrameHelper | APIPlaintextFrameHelper = None self.api_version: APIVersion | None = None diff --git a/requirements_test.txt b/requirements_test.txt index 09f57741..bea2c520 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,7 +2,7 @@ pylint==3.2.6 black==24.8.0 flake8==7.1.1 isort==5.13.2 -mypy==1.10.1 +mypy==1.11.1 types-protobuf==5.27.0.20240626 pytest>=6.2.4,<9 pytest-asyncio==0.23.8