Skip to content

Commit ccc92a9

Browse files
committed
Ruff check fixes.
1 parent ec00ad7 commit ccc92a9

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

tests/test_vendor_kuando_busylight_alpha.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
class TestKuandoBusylightAlpha:
1212
"""Test the Busylight Alpha device-specific functionality."""
13+
1314
@pytest.fixture
1415
def mock_hardware(self) -> Hardware:
1516
"""Create mock hardware for testing Alpha-specific device IDs."""
@@ -53,15 +54,15 @@ def test_claims_method_with_alpha_hardware(self, mock_hardware) -> None:
5354
# Test with Alpha device ID
5455
mock_hardware.device_id = (0x04D8, 0xF848)
5556
assert Busylight_Alpha.claims(mock_hardware) is True
56-
57+
5758
# Test with another Alpha device ID
5859
mock_hardware.device_id = (0x27BB, 0x3BCA)
5960
assert Busylight_Alpha.claims(mock_hardware) is True
60-
61+
6162
# Test with Omega device ID (should not claim)
6263
mock_hardware.device_id = (0x27BB, 0x3BCD)
6364
assert Busylight_Alpha.claims(mock_hardware) is False
64-
65+
6566
# Test with unknown device ID
6667
mock_hardware.device_id = (0x1234, 0x5678)
6768
assert Busylight_Alpha.claims(mock_hardware) is False

tests/test_vendor_kuando_busylight_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ def busylight(self, mock_hardware) -> BusylightBase:
196196
mock_hardware.handle.read = Mock(return_value=b"\x00" * 64)
197197

198198
# Mock the claims method to allow instantiation
199-
with patch.object(BusylightBase, 'claims', return_value=True):
199+
with patch.object(BusylightBase, "claims", return_value=True):
200200
instance = BusylightBase(mock_hardware, reset=False, exclusive=False)
201-
201+
202202
# Mock the name property to avoid device_id lookup issues
203203
instance.name = "Test Busylight"
204204
return instance
@@ -428,4 +428,4 @@ async def test_keepalive_batch_update_usage(self, mock_light) -> None:
428428
# Should use batch_update for each keepalive call
429429
mock_light.batch_update.assert_called()
430430
mock_light.batch_update.return_value.__enter__.assert_called()
431-
mock_light.batch_update.return_value.__exit__.assert_called()
431+
mock_light.batch_update.return_value.__exit__.assert_called()

tests/test_vendor_kuando_busylight_omega.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
class TestKuandoBusylightOmega:
1212
"""Test the Busylight Omega device-specific functionality."""
13+
1314
@pytest.fixture
1415
def mock_hardware(self) -> Hardware:
1516
"""Create mock hardware for testing Omega-specific device IDs."""
@@ -51,19 +52,19 @@ def test_claims_method_with_omega_hardware(self, mock_hardware) -> None:
5152
# Test with Omega device ID
5253
mock_hardware.device_id = (0x27BB, 0x3BCD)
5354
assert Busylight_Omega.claims(mock_hardware) is True
54-
55+
5556
# Test with another Omega device ID
5657
mock_hardware.device_id = (0x27BB, 0x3BCF)
5758
assert Busylight_Omega.claims(mock_hardware) is True
58-
59+
5960
# Test with Alpha device ID (should not claim)
6061
mock_hardware.device_id = (0x04D8, 0xF848)
6162
assert Busylight_Omega.claims(mock_hardware) is False
62-
63+
6364
# Test with another Alpha device ID (should not claim)
6465
mock_hardware.device_id = (0x27BB, 0x3BCA)
6566
assert Busylight_Omega.claims(mock_hardware) is False
66-
67+
6768
# Test with unknown device ID
6869
mock_hardware.device_id = (0x1234, 0x5678)
69-
assert Busylight_Omega.claims(mock_hardware) is False
70+
assert Busylight_Omega.claims(mock_hardware) is False

0 commit comments

Comments
 (0)