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)) diff --git a/pyproject.toml b/pyproject.toml index 4e06c7da..b88c661a 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", ] @@ -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