mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Remove lru cache size limit of TemperatureConverter (#109726)
This commit is contained in:
parent
94ccd59123
commit
49a99559c7
@ -365,7 +365,7 @@ class TemperatureConverter(BaseUnitConverter):
|
|||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@lru_cache(maxsize=8)
|
@lru_cache
|
||||||
def converter_factory(
|
def converter_factory(
|
||||||
cls, from_unit: str | None, to_unit: str | None
|
cls, from_unit: str | None, to_unit: str | None
|
||||||
) -> Callable[[float], float]:
|
) -> Callable[[float], float]:
|
||||||
@ -379,7 +379,7 @@ class TemperatureConverter(BaseUnitConverter):
|
|||||||
return cls._converter_factory(from_unit, to_unit)
|
return cls._converter_factory(from_unit, to_unit)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@lru_cache(maxsize=8)
|
@lru_cache
|
||||||
def converter_factory_allow_none(
|
def converter_factory_allow_none(
|
||||||
cls, from_unit: str | None, to_unit: str | None
|
cls, from_unit: str | None, to_unit: str | None
|
||||||
) -> Callable[[float | None], float | None]:
|
) -> Callable[[float | None], float | None]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user