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 33a8060 commit 7119f75Copy full SHA for 7119f75
test-data/unit/check-modules.test
@@ -1191,3 +1191,27 @@ pass
1191
[file b]
1192
pass
1193
[out]
1194
+
1195
+[case testTypeCheckPrio]
1196
+# cmd: mypy -m part1 part2 part3 part4
1197
1198
+[file part1.py]
1199
+from part3 import Thing
1200
+class FirstThing: pass
1201
1202
+[file part2.py]
1203
+from part4 import part4_thing as Thing
1204
1205
+[file part3.py]
1206
+from part2 import Thing
1207
+reveal_type(Thing)
1208
1209
+[file part4.py]
1210
+from typing import TYPE_CHECKING
1211
+if TYPE_CHECKING:
1212
+ from part1 import FirstThing
1213
+def part4_thing(a: int) -> str: pass
1214
1215
+[builtins fixtures/bool.pyi]
1216
+[out]
1217
+tmp/part3.py:2: error: Revealed type is 'def (a: builtins.int) -> builtins.str'
0 commit comments