mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-09 08:58:01 +00:00
Enable ruff check for ANN (#1139)
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user