Enable ruff check for ANN (#1139)

This commit is contained in:
Teemu R.
2024-11-10 19:55:13 +01:00
committed by GitHub
parent 6b44fe6242
commit 66eb17057e
89 changed files with 596 additions and 452 deletions

View File

@@ -21,7 +21,7 @@ class Time(SmartModule, TimeInterface):
_timezone: tzinfo = timezone.utc
def _initialize_features(self):
def _initialize_features(self) -> None:
"""Initialize features after the initial update."""
self._add_feature(
Feature(
@@ -35,7 +35,7 @@ class Time(SmartModule, TimeInterface):
)
)
async def _post_update_hook(self):
async def _post_update_hook(self) -> None:
"""Perform actions after a device update."""
td = timedelta(minutes=cast(float, self.data.get("time_diff")))
if region := self.data.get("region"):
@@ -84,7 +84,7 @@ class Time(SmartModule, TimeInterface):
params["region"] = region
return await self.call("set_device_time", params)
async def _check_supported(self):
async def _check_supported(self) -> bool:
"""Additional check to see if the module is supported by the device.
Hub attached sensors report the time module but do return device time.