diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 4d51ee4..1e04800 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -167,7 +167,6 @@ from typing import ( TYPE_CHECKING, Set, ) -from typing_extensions import TypedDict, NotRequired from IPython.core.error import TryNext from IPython.core.inputtransformer2 import ESC_MAGIC @@ -208,11 +207,14 @@ except ImportError: if TYPE_CHECKING: from typing import cast + from typing_extensions import TypedDict, NotRequired else: def cast(obj, _type): return obj + TypedDict = Dict + NotRequired = Tuple # ----------------------------------------------------------------------------- # Globals diff --git a/setup.cfg b/setup.cfg index 0e37183..8d5136d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -74,6 +74,7 @@ test_extra = numpy>=1.19 pandas trio + typing_extensions all = %(black)s %(doc)s