1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Upgrade pyupgrade to 2.21.2, apply its changes (#52987)

This commit is contained in:
Ville Skyttä
2021-07-19 11:46:09 +03:00
committed by GitHub
parent c96f01df1f
commit 470f2dd73f
73 changed files with 152 additions and 162 deletions

View File

@@ -155,7 +155,7 @@ async def async_get_component_strings(
domains,
await gather_with_concurrency(
MAX_LOAD_CONCURRENTLY,
*[async_get_integration(hass, domain) for domain in domains],
*(async_get_integration(hass, domain) for domain in domains),
),
)
)
@@ -234,10 +234,10 @@ class _TranslationCache:
# Fetch the English resources, as a fallback for missing keys
languages = [LOCALE_EN] if language == LOCALE_EN else [LOCALE_EN, language]
for translation_strings in await asyncio.gather(
*[
*(
async_get_component_strings(self.hass, lang, components)
for lang in languages
]
)
):
self._build_category_cache(language, components, translation_strings)