From a58bcdce83a7e70df99cd5f87ca34b472a215294 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 08:51:55 +0000 Subject: [PATCH 1/3] Bump ruff from 0.9.10 to 0.11.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.10 to 0.11.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.9.10...0.11.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 4e06c7da..5404754d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ test = [ "pytest-asyncio==0.26.0", "pytest-aiohttp==1.1.0", "pytest-cov==6.0.0", - "ruff==0.9.10", + "ruff==0.11.2", "tomli==2.2.1", ] From 8b9e3b25629d4012f8006a8dd0ae37141a2c98aa Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 2 Apr 2025 09:23:27 +0200 Subject: [PATCH 2/3] Disable TC006 Follow Core's practice and disable TC006. Using actual types seem easier to read (due to syntax highlighting) and less error-prone. --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 5404754d..b88c661a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -170,6 +170,8 @@ ignore = [ "TD004", # Just annoying, not really useful "COM812", # Conflict with the Ruff formatter "ISC001", # Conflict with the Ruff formatter + # Quotes for typing.cast generally not necessary, only for performance critical paths + "TC006", # Add quotes to type expression in typing.cast() "TID252", # TEMPORARY DISABLED "N805", # TEMPORARY DISABLED "EXE002", # TEMPORARY DISABLED From 11145683ab08d990f15923ea78c3b58d9b10d38a Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 2 Apr 2025 09:29:14 +0200 Subject: [PATCH 3/3] Use module logger instance --- matter_server/server/ota/provider.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matter_server/server/ota/provider.py b/matter_server/server/ota/provider.py index 73a19384..606ffda8 100644 --- a/matter_server/server/ota/provider.py +++ b/matter_server/server/ota/provider.py @@ -149,13 +149,13 @@ async def _commission_ota_provider( ) ) if write_result[0].Status != Status.Success: - logging.error( + LOGGER.error( "Failed writing adjusted OTA Provider App ACL: Status %s.", str(write_result[0].Status), ) raise UpdateError("Error while setting up OTA Provider.") except ChipStackError as ex: - logging.exception("Failed setting up OTA Provider.", exc_info=ex) + LOGGER.exception("Failed setting up OTA Provider.", exc_info=ex) raise UpdateError("Error while setting up OTA Provider.") from ex async def start_update( @@ -323,7 +323,7 @@ async def fetch_update(self, update_desc: dict) -> None: elif parsed_url.scheme in ["file"]: file_path = self._ota_provider_base_dir / Path(parsed_url.path[1:]) if not await asyncio.to_thread(file_path.exists): - logging.warning("Local update file not found: %s", file_path) + LOGGER.warning("Local update file not found: %s", file_path) raise UpdateError("Local update file not found") if checksum_alg: checksum_alg.update(await asyncio.to_thread(file_path.read_bytes))