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

Drop ChainMap in translation cache (#85260)

This commit is contained in:
J. Nick Koston
2023-01-06 11:52:18 -10:00
committed by GitHub
parent d75087ede5
commit 194adcde9c

View File

@@ -2,7 +2,6 @@
from __future__ import annotations
import asyncio
from collections import ChainMap
from collections.abc import Iterable, Mapping
import logging
from typing import Any
@@ -311,4 +310,7 @@ async def async_get_translations(
cache = hass.data[TRANSLATION_FLATTEN_CACHE] = _TranslationCache(hass)
cached = await cache.async_fetch(language, category, components)
return dict(ChainMap(*cached))
result = {}
for entry in cached:
result.update(entry)
return result