From 3b8d99dcd85cbe1139d8e6bc80acd54101fae043 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 10 Sep 2023 13:46:55 -0500 Subject: [PATCH] Add __slots__ to translation cache (#100069) --- homeassistant/helpers/translation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/helpers/translation.py b/homeassistant/helpers/translation.py index 79ac3a0c5b7..41ad591d878 100644 --- a/homeassistant/helpers/translation.py +++ b/homeassistant/helpers/translation.py @@ -190,6 +190,8 @@ async def _async_get_component_strings( class _TranslationCache: """Cache for flattened translations.""" + __slots__ = ("hass", "loaded", "cache") + def __init__(self, hass: HomeAssistant) -> None: """Initialize the cache.""" self.hass = hass