From a8f86e32b981aef62890605e12da9cd59c9cc0c8 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Mon, 23 Sep 2024 22:01:57 +0100 Subject: [PATCH] core.time: hotfix for default force_abbreviations attribute --- my/core/time.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/my/core/time.py b/my/core/time.py index 6de4105..fa20a7c 100644 --- a/my/core/time.py +++ b/my/core/time.py @@ -11,11 +11,11 @@ def user_forced() -> Sequence[str]: # https://stackoverflow.com/questions/36067621/python-all-possible-timezone-abbreviations-for-given-timezone-name-and-vise-ve try: from my.config import time as user_config + return user_config.tz.force_abbreviations # type: ignore[attr-defined] # noqa: TRY300 + # note: noqa since we're catching case where config doesn't have attribute here as well except: # todo log/apply policy return [] - else: - return user_config.tz.force_abbreviations # type: ignore[attr-defined] @lru_cache(1)