8000 Apply suggestions from code review · home-assistant/core@c53bf11 · GitHub
[go: up one dir, main page]

Skip to content

Commit c53bf11

Browse files
authored
Apply suggestions from code review
1 parent 554f8b8 commit c53bf11

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

homeassistant/components/lifx/coordinator.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,10 @@ async def _async_update_data(self) -> None:
211211
await asyncio.gather(*tasks)
212212

213213
events = []
214-
# Make a copy of the bulb's message queue to avoid the dictionary changing
215-
# size during iteration
216-
for _response, event, _callb in list(self.device.message.values()):
214+
for _response, event, _callb in self.device.message.values():
217215
if isinstance(event, asyncio.Event):
218216
events.append(event.wait())
219-
if len(events) > 0:
217+
if events:
220218
async with asyncio_timeout(MESSAGE_TIMEOUT):
221219
await asyncio.gather(*events)
222220

0 commit comments

Comments
 (0)
0