Skip to content

Commit 0ab2021

Browse files
committed
import type hints from typing, not collections
doesn't seem to work with python 3.8 otherwise
1 parent 89bfd10 commit 0ab2021

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

khal/plugins.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from collections.abc import Callable, Mapping
2-
from typing import Dict, List, Tuple
1+
from typing import Callable, Dict, List, Mapping, Tuple
32

43
from khal._compat import importlib_metadata
54

@@ -9,7 +8,7 @@
98
# https://setuptools.pypa.io/en/latest/userguide/entry_point.html
109

1110

12-
def _load_formatters() -> dict[str, Callable[[str], str]]:
11+
def _load_formatters() -> Dict[str, Callable[[str], str]]:
1312
formatter_entrypoints = importlib_metadata.entry_points(group="khal.formatter")
1413
return {ep.name: ep.load() for ep in formatter_entrypoints}
1514

@@ -22,8 +21,9 @@ def _load_color_themes() -> Dict[str, List[Tuple[str, ...]]]:
2221

2322
THEMES: Dict[str, List[Tuple[str, ...]],] = _load_color_themes()
2423

25-
def _load_commands() -> dict[str, Callable]:
24+
25+
def _load_commands() -> Dict[str, Callable]:
2626
command_entrypoints = importlib_metadata.entry_points(group="khal.commands")
2727
return {ep.name: ep.load() for ep in command_entrypoints}
2828

29-
COMMANDS: dict[str, Callable] = _load_commands()
29+
COMMANDS: Dict[str, Callable] = _load_commands()

0 commit comments

Comments
 (0)