We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f426800 commit 923d496Copy full SHA for 923d496
TEST.py
@@ -0,0 +1,14 @@
1
+from mypy.typing import TypedDict
2
+Point = TypedDict('Point', {'x': int, 'y': int})
3
+point = dict(x=42, y=1337) # type: Point
4
+
5
6
+"""
7
+from typing import TYPE_CHECKING
8
+if TYPE_CHECKING:
9
+ from typing import TypedDict
10
+else:
11
+ TypedDict = lambda name, fields: dict
12
13
14
mypy/test/testsemanal.py
@@ -78,6 +78,7 @@ def test_semanal(testcase):
78
# TODO the test is not reliable
79
if (not f.path.endswith((os.sep + 'builtins.pyi',
80
'typing.pyi',
81
+ 'typing.py',
82
'abc.pyi',
83
'collections.pyi'))
84
and not os.path.basename(f.path).startswith('_')
0 commit comments