##// END OF EJS Templates
Shim TypedDict and NotRequired at runtime until...
krassowski -
Show More
@@ -167,7 +167,6 b' from typing import ('
167 TYPE_CHECKING,
167 TYPE_CHECKING,
168 Set,
168 Set,
169 )
169 )
170 from typing_extensions import TypedDict, NotRequired
171
170
172 from IPython.core.error import TryNext
171 from IPython.core.error import TryNext
173 from IPython.core.inputtransformer2 import ESC_MAGIC
172 from IPython.core.inputtransformer2 import ESC_MAGIC
@@ -208,11 +207,14 b' except ImportError:'
208
207
209 if TYPE_CHECKING:
208 if TYPE_CHECKING:
210 from typing import cast
209 from typing import cast
210 from typing_extensions import TypedDict, NotRequired
211 else:
211 else:
212
212
213 def cast(obj, _type):
213 def cast(obj, _type):
214 return obj
214 return obj
215
215
216 TypedDict = Dict
217 NotRequired = Tuple
216
218
217 # -----------------------------------------------------------------------------
219 # -----------------------------------------------------------------------------
218 # Globals
220 # Globals
@@ -74,6 +74,7 b' test_extra ='
74 numpy>=1.19
74 numpy>=1.19
75 pandas
75 pandas
76 trio
76 trio
77 typing_extensions
77 all =
78 all =
78 %(black)s
79 %(black)s
79 %(doc)s
80 %(doc)s
General Comments 0
You need to be logged in to leave comments. Login now