Add __slots__ to translation cache (#100069)

This commit is contained in:
J. Nick Koston 2023-09-10 13:46:55 -05:00 committed by GitHub
parent 3238386f48
commit 3b8d99dcd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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