Skip to content

Commit b295a7f

Browse files
committed
ruff: PLW2901 for loop variable address overwritten by assignment target
1 parent 206efee commit b295a7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugwise_usb/network/registry.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,17 @@ async def update_missing_registrations(self, quick: bool = False) -> None: # no
189189
continue
190190
registration = await self.retrieve_network_registration(address, False)
191191
if registration is not None:
192-
address, mac = registration
192+
nextaddress, mac = registration
193193
if mac == "":
194-
self._first_free_address = min(self._first_free_address, address)
194+
self._first_free_address = min(self._first_free_address, nextaddress)
195195
if quick:
196196
break
197197
_LOGGER.debug(
198198
"Network registration at address %s is %s",
199-
str(address),
199+
str(nextaddress),
200200
"'empty'" if mac == "" else f"set to {mac}",
201201
)
202-
self.update_network_registration(address, mac, None)
202+
self.update_network_registration(nextaddress, mac, None)
203203
await sleep(0.1)
204204
if not quick:
205205
await sleep(10)

0 commit comments

Comments
 (0)