general: switch to using native 3.8 versions for cached_property/Literal/Protocol instead of compat

This commit is contained in:
Dima Gerasimov 2023-05-16 01:01:48 +01:00
parent fe2c99f037
commit 0e9624e354
16 changed files with 29 additions and 98 deletions

View file

@ -73,7 +73,7 @@ def get_location(dt: datetime) -> LatLon:
return loc[0].lat, loc[0].lon
# TODO: in python3.9, use functools.cached_property instead?
# TODO: in python3.8, use functools.cached_property instead?
@lru_cache(maxsize=None)
def homes_cached() -> List[Tuple[datetime, LatLon]]:
return list(config._history)