summaryrefslogtreecommitdiff
path: root/poezio/core
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-01-29 10:25:00 +0100
committermathieui <mathieui@mathieui.net>2021-01-29 10:25:00 +0100
commitb2c846f959cf5a67fa714a40e9aa04ae6ddabbe1 (patch)
tree2c744610b1661be2fd37728e16a3ad92f5c1e724 /poezio/core
parent233d6d2252c01d5d6bdea0b02bc44a279ef765f7 (diff)
downloadpoezio-b2c846f959cf5a67fa714a40e9aa04ae6ddabbe1.tar.gz
poezio-b2c846f959cf5a67fa714a40e9aa04ae6ddabbe1.tar.bz2
poezio-b2c846f959cf5a67fa714a40e9aa04ae6ddabbe1.tar.xz
poezio-b2c846f959cf5a67fa714a40e9aa04ae6ddabbe1.zip
Use typing_extensions for TypedDict
Diffstat (limited to 'poezio/core')
-rw-r--r--poezio/core/command_defs.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/poezio/core/command_defs.py b/poezio/core/command_defs.py
index 643e2289..b2fefa38 100644
--- a/poezio/core/command_defs.py
+++ b/poezio/core/command_defs.py
@@ -1,8 +1,18 @@
+from typing import Callable, List
+
from poezio.core.commands import CommandCore
from poezio.core.completions import CompletionCore
from poezio.plugin_manager import PluginManager
-from typing import TypedDict, Callable, List
+
+try:
+ from typing_extensions import TypedDict
+except ImportError:
+ from sys import version_info
+ if version_info < (3, 9):
+ raise
+ from typing import TypedDict
+
CommandDict = TypedDict(
"CommandDict",