Skip to content

Commit efa24a2

Browse files
committed
fix return value
1 parent 2efa143 commit efa24a2

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,6 @@ async def load(self) -> None:
924924
self._setup_protocol(CIRCLE_FIRMWARE_SUPPORT, CIRCLE_FEATURES)
925925
await self._loaded_callback(NodeEvent.LOADED, self.mac)
926926
await self.initialize()
927-
return True
928927

929928
async def _load_from_cache(self) -> bool:
930929
"""Load states from previous cached information. Returns True if successful."""

tests/test_usb.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ async def test_stick_node_discovered_subscription(
575575
assert mac_awake_node == "5555555555555555"
576576
unsub_awake()
577577

578-
assert await stick.nodes["5555555555555555"].load() is None
578+
await stick.nodes["5555555555555555"].load()
579579
assert stick.nodes["5555555555555555"].node_info.firmware == dt(
580580
2011, 6, 27, 8, 55, 44, tzinfo=UTC
581581
)
@@ -771,7 +771,7 @@ async def test_node_relay_and_power(self, monkeypatch: pytest.MonkeyPatch) -> No
771771
await stick.nodes["0098765432101234"].set_relay_lock(True)
772772

773773
# Manually load node
774-
assert await stick.nodes["0098765432101234"].load()
774+
await stick.nodes["0098765432101234"].load()
775775

776776
# Check relay_lock is set to False when not in cache
777777
assert stick.nodes["0098765432101234"].relay_lock
@@ -849,7 +849,7 @@ async def test_node_relay_and_power(self, monkeypatch: pytest.MonkeyPatch) -> No
849849
with pytest.raises(pw_exceptions.NodeError):
850850
await stick.nodes["2222222222222222"].set_relay_init(True)
851851

852-
assert await stick.nodes["2222222222222222"].load()
852+
await stick.nodes["2222222222222222"].load()
853853
self.test_init_relay_state_on = asyncio.Future()
854854
self.test_init_relay_state_off = asyncio.Future()
855855
unsub_inti_relay = stick.nodes["2222222222222222"].subscribe_to_feature_update(
@@ -904,7 +904,7 @@ async def fake_get_missing_energy_logs(address: int) -> None:
904904
assert not stick.nodes["0098765432101234"].calibrated
905905

906906
# Manually load node
907-
assert await stick.nodes["0098765432101234"].load()
907+
await stick.nodes["0098765432101234"].load()
908908

909909
# Check calibration in loaded state
910910
assert stick.nodes["0098765432101234"].calibrated
@@ -1951,7 +1951,7 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
19511951

19521952
assert test_sed.node_info.is_battery_powered
19531953
assert test_sed.is_battery_powered
1954-
assert await test_sed.load()
1954+
await test_sed.load()
19551955
assert sorted(test_sed.features) == sorted(
19561956
(
19571957
pw_api.NodeFeature.AVAILABLE,
@@ -2168,7 +2168,7 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
21682168
relay_state=None,
21692169
)
21702170
await test_scan.update_node_details(node_info)
2171-
assert await test_scan.load() is None
2171+
await test_scan.load()
21722172

21732173
# test motion reset timer
21742174
assert test_scan.reset_timer == 10

0 commit comments

Comments
 (0)