Skip to content

Commit 22cbfee

Browse files
author
autoruff
committed
fixup: mdi_clock Python code reformatted using Ruff
1 parent af2d642 commit 22cbfee

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

plugwise_usb/network/cache.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ async def save_cache(self) -> None:
3030
mac: node_type.name for mac, node_type in self._nodetypes.items()
3131
}
3232
_LOGGER.debug("Save NodeTypes for %s Nodes", len(cache_data_to_save))
33-
await self.write_cache(cache_data_to_save, rewrite=True) # Make sure the cache-contents is actual
33+
await self.write_cache(
34+
cache_data_to_save, rewrite=True
35+
) # Make sure the cache-contents is actual
3436

3537
async def clear_cache(self) -> None:
3638
"""Clear current cache."""
@@ -54,7 +56,9 @@ async def restore_cache(self) -> None:
5456
node_type = None
5557

5658
if node_type is None:
57-
_LOGGER.warning("Invalid NodeType in cache for mac %s: %s", mac, node_value)
59+
_LOGGER.warning(
60+
"Invalid NodeType in cache for mac %s: %s", mac, node_value
61+
)
5862
continue
5963
self._nodetypes[mac] = node_type
6064
_LOGGER.debug(

plugwise_usb/nodes/circle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,9 @@ async def _clock_synchronize_scheduler(self) -> None:
864864
try:
865865
await self.clock_synchronize()
866866
except Exception:
867-
_LOGGER.exception("Clock synchronization failed for %s", self._mac_in_str)
867+
_LOGGER.exception(
868+
"Clock synchronization failed for %s", self._mac_in_str
869+
)
868870
except CancelledError:
869871
_LOGGER.debug("Clock sync scheduler cancelled for %s", self._mac_in_str)
870872
raise

0 commit comments

Comments
 (0)