Skip to content

Commit b1dc733

Browse files
author
autoruff
committed
fixup: fix-399 Python code fixed using Ruff
1 parent 4ae27e8 commit b1dc733

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/stick_test_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@
613613
"Circle+ Realtime set clock at month-end for 0098765432101234",
614614
b"000000C1", # Success ack
615615
b"0000" + b"00D7" + b"0098765432101234", # msg_id, clock_ack, mac
616-
),
616+
),
617617
b"\x05\x05\x03\x03003E11111111111111111B8A\r\n": (
618618
"clock for 0011111111111111",
619619
b"000000C1", # Success ack

tests/test_usb.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,7 +3046,7 @@ async def test_clock_synchronize_month_overflow(
30463046
self, monkeypatch: pytest.MonkeyPatch
30473047
) -> None:
30483048
"""Test clock_synchronize handles month-end date rollover correctly.
3049-
3049+
30503050
Regression test for issue `#399`: ensures that when the Circle's day_of_week
30513051
differs from the current weekday near month-end, the date calculation
30523052
doesn't attempt an invalid day value (e.g., Jan 32).
@@ -3065,12 +3065,12 @@ async def test_clock_synchronize_month_overflow(
30653065
await stick.initialize()
30663066
await stick.discover_nodes(load=False)
30673067
await self._wait_for_scan(stick)
3068-
3068+
30693069
# Get a Circle node
30703070
circle_node = stick.nodes.get("0098765432101234")
30713071
assert circle_node is not None
30723072
await circle_node.load()
3073-
3073+
30743074
# Mock CircleClockGetRequest.send() to return a response where
30753075
# day_of_week is Saturday (5) while frozen time is Friday (4), Jan 31
30763076
async def mock_clock_get_send(self):
@@ -3082,15 +3082,15 @@ async def mock_clock_get_send(self):
30823082
response.day_of_week.value = 5 # Saturday
30833083
response.time.value = dt.now(tz=UTC).time()
30843084
return response
3085-
3085+
30863086
monkeypatch.setattr(
30873087
pw_requests.CircleClockGetRequest,
30883088
"send",
30893089
mock_clock_get_send,
30903090
)
3091-
3091+
30923092
# This should not raise ValueError about invalid day
30933093
result = await circle_node.clock_synchronize()
30943094
assert result is True
3095-
3095+
30963096
await stick.disconnect()

0 commit comments

Comments
 (0)