diff --git a/matter_server/client/client.py b/matter_server/client/client.py index 5757d92b..dd7796cc 100644 --- a/matter_server/client/client.py +++ b/matter_server/client/client.py @@ -4,7 +4,7 @@ import asyncio import logging -from typing import TYPE_CHECKING, Any, Final, cast +from typing import TYPE_CHECKING, Any, Final, Self, cast import uuid from chip.clusters import Objects as Clusters @@ -788,7 +788,7 @@ def _signal_event( for callback in self._subscribers.get(key, []): callback(event, data) - async def __aenter__(self) -> "MatterClient": + async def __aenter__(self) -> Self: """Initialize and connect the Matter Websocket client.""" await self.connect() return self diff --git a/pyproject.toml b/pyproject.toml index b43c48b6..9f70528c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ test = [ "pytest-asyncio==1.3.0", "pytest-aiohttp==1.1.0", "pytest-cov==7.0.0", - "ruff==0.14.13", + "ruff==0.14.14", "tomli==2.4.0", ] @@ -222,7 +222,6 @@ ignore = [ "SLF001", # TEMPORARY DISABLED "RUF010", # TEMPORARY DISABLED "TRY300", # TEMPORARY DISABLED - "UP038", # TEMPORARY DISABLED "PTH118", # TEMPORARY DISABLED "PTH112", # TEMPORARY DISABLED "PTH102", # TEMPORARY DISABLED