Skip to content

Commit 04fd474

Browse files
committed
Ruff fixes
1 parent ef1deb0 commit 04fd474

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

plugwise_usb/nodes/scan.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,7 @@ async def set_motion_daylight_mode(self, state: bool) -> bool:
305305
if self._motion_config.daylight_mode == state:
306306
return False
307307

308-
self._new_motion_config = replace(
309-
self._new_motion_config, daylight_mode=state
310-
)
308+
self._new_motion_config = replace(self._new_motion_config, daylight_mode=state)
311309
if not self._scan_config_task_scheduled:
312310
self._scan_config_task_scheduled = True
313311
await self.schedule_task_when_awake(await self._configure_scan_task())
@@ -333,9 +331,7 @@ async def set_motion_reset_timer(self, minutes: int) -> bool:
333331
if self._motion_config.reset_timer == minutes:
334332
return False
335333

336-
self._new_motion_config = replace(
337-
self._new_motion_config, reset_timer=minutes
338-
)
334+
self._new_motion_config = replace(self._new_motion_config, reset_timer=minutes)
339335
if not self._scan_config_task_scheduled:
340336
_LOGGER.debug(
341337
"set_motion_reset_timer | Device %s | schedule config",

tests/test_usb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2198,7 +2198,7 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
21982198
assert test_scan.reset_timer == 10
21992199

22002200
# Restore to original settings after failed config
2201-
#await test_scan.set_motion_reset_timer(15)
2201+
# await test_scan.set_motion_reset_timer(15)
22022202
awake_response1 = pw_responses.NodeAwakeResponse()
22032203
awake_response1.deserialize(
22042204
construct_message(b"004F1298347650AFBECD00", b"FFFE")

0 commit comments

Comments
 (0)