Avoid creating temporary lists (#25317)
That gives nano performance improvements as *() is slightly faster then *[].
This commit is contained in:
1 parent
caa7a3a3d6
commit
979f801488
13 files changed
+42
-42
No files matched your search
@@ -109,8 +109,8 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
||||
device.label, device.device_id, exc_info=True)
|
||||
devices.remove(device)
|
||||
|
||||
await asyncio.gather(*[retrieve_device_status(d)
|
||||
for d in devices.copy()])
|
||||
await asyncio.gather(*(retrieve_device_status(d)
|
||||
for d in devices.copy()))
|
||||
|
||||
# Sync device subscriptions
|
||||
await smartapp_sync_subscriptions(
|
||||
|
||||
Reference in new issue
Block a user