Avoid creating temporary lists (#25317)
That gives nano performance improvements as *() is slightly faster then *[].
This commit is contained in:
parent
caa7a3a3d6
commit
979f801488
13 changed files with 42 additions and 42 deletions
|
@ -95,10 +95,10 @@ async def async_extract_config(hass, config):
|
|||
"""Extract device tracker config and split between legacy and modern."""
|
||||
legacy = []
|
||||
|
||||
for platform in await asyncio.gather(*[
|
||||
for platform in await asyncio.gather(*(
|
||||
async_create_platform_type(hass, config, p_type, p_config)
|
||||
for p_type, p_config in config_per_platform(config, DOMAIN)
|
||||
]):
|
||||
)):
|
||||
if platform is None:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue