mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 19:27:51 +00:00
Drop ChainMap in translation cache (#85260)
This commit is contained in:
parent
d75087ede5
commit
194adcde9c
@ -2,7 +2,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from collections import ChainMap
|
|
||||||
from collections.abc import Iterable, Mapping
|
from collections.abc import Iterable, Mapping
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@ -311,4 +310,7 @@ async def async_get_translations(
|
|||||||
cache = hass.data[TRANSLATION_FLATTEN_CACHE] = _TranslationCache(hass)
|
cache = hass.data[TRANSLATION_FLATTEN_CACHE] = _TranslationCache(hass)
|
||||||
cached = await cache.async_fetch(language, category, components)
|
cached = await cache.async_fetch(language, category, components)
|
||||||
|
|
||||||
return dict(ChainMap(*cached))
|
result = {}
|
||||||
|
for entry in cached:
|
||||||
|
result.update(entry)
|
||||||
|
return result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user