From 7772ce208eaabe6c3b7c946603844f4bd55c94b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:46:07 +0000 Subject: [PATCH 1/2] Bump ruff from 0.5.7 to 0.6.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.7 to 0.6.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.7...0.6.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a2dd63d3..edef1b4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ test = [ "pytest-asyncio==0.24.0", "pytest-aiohttp==1.0.5", "pytest-cov==5.0.0", - "ruff==0.5.7", + "ruff==0.6.2", "tomli==2.0.1", ] From 71937efca532d41f708f28b07293c99455a485f6 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 27 Aug 2024 17:14:06 +0200 Subject: [PATCH 2/2] Disable timeout linter warning --- matter_server/client/client.py | 2 +- matter_server/server/device_controller.py | 8 +++++++- matter_server/server/helpers/utils.py | 2 +- matter_server/server/sdk.py | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/matter_server/client/client.py b/matter_server/client/client.py index ec87dba7..aa5f629d 100644 --- a/matter_server/client/client.py +++ b/matter_server/client/client.py @@ -182,7 +182,7 @@ async def set_thread_operational_dataset(self, dataset: str) -> None: async def open_commissioning_window( self, node_id: int, - timeout: int = 300, + timeout: int = 300, # noqa: ASYNC109 timeout parameter required for native timeout iteration: int = 1000, option: int = 1, discriminator: Optional[int] = None, diff --git a/matter_server/server/device_controller.py b/matter_server/server/device_controller.py index 65a5412f..0edc50b9 100644 --- a/matter_server/server/device_controller.py +++ b/matter_server/server/device_controller.py @@ -443,7 +443,7 @@ async def set_thread_operational_dataset(self, dataset: str) -> None: async def open_commissioning_window( self, node_id: int, - timeout: int = 300, + timeout: int = 300, # noqa: ASYNC109 timeout parameter required for native timeout iteration: int = 1000, option: int = ChipDeviceController.CommissioningWindowPasscode.kTokenWithRandomPin, discriminator: int | None = None, @@ -677,6 +677,12 @@ async def read_attribute( for attr_path in attribute_paths } + LOGGER.debug( + "read_attribute called for node %s on path(s): %s - fabric_filtered: %s", + node_id, + str(attribute_paths), + fabric_filtered, + ) # parse text based attribute paths into the SDK Attribute Path objects attributes: list[Attribute.AttributePath] = [] for attr_path in attribute_paths: diff --git a/matter_server/server/helpers/utils.py b/matter_server/server/helpers/utils.py index cc8d567b..a37425a5 100644 --- a/matter_server/server/helpers/utils.py +++ b/matter_server/server/helpers/utils.py @@ -9,7 +9,7 @@ PLATFORM_MAC = platform.system() == "Darwin" -async def ping_ip(ip_address: str, timeout: int = 2, attempts: int = 1) -> bool: +async def ping_ip(ip_address: str, timeout: int = 2, attempts: int = 1) -> bool: # noqa: ASYNC109 timeout parameter required for native ping timeout """Ping given (IPv4 or IPv6) IP-address.""" is_ipv6 = ":" in ip_address if is_ipv6 and PLATFORM_MAC: diff --git a/matter_server/server/sdk.py b/matter_server/server/sdk.py index 52ee519b..3485c371 100644 --- a/matter_server/server/sdk.py +++ b/matter_server/server/sdk.py @@ -194,7 +194,7 @@ async def unpair_device(self, node_id: int) -> PyChipError: async def open_commissioning_window( self, node_id: int, - timeout: int, + timeout: int, # noqa: ASYNC109 timeout parameter required for native timeout iteration: int, discriminator: int, option: ChipDeviceController.CommissioningWindowPasscode,