diff --git a/setup.cfg b/setup.cfg index a343d1a..6b9f1f9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,6 +38,7 @@ setup_requires = install_requires = importlib-metadata; python_version < '3.8' + typing-extensions; python_version < '3.10' munch[yaml] timew-report pycairo diff --git a/src/timew_status/utils.py b/src/timew_status/utils.py index d7e2011..f424756 100644 --- a/src/timew_status/utils.py +++ b/src/timew_status/utils.py @@ -9,10 +9,14 @@ from datetime import timedelta from pathlib import Path from shutil import which -from typing import Dict, NewType, Optional from munch import Munch +if sys.version_info < (3, 10): + from typing_extensions import Dict, NewType, Optional +else: + from typing import Dict, NewType, Optional + TimeDelta = NewType("TimeDelta", datetime.timedelta) APP_NAME = 'timew_status_indicator' CFG = {