File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1175,6 +1175,33 @@ reveal_type(x)
1175
1175
main:1: error: Incompatible types in assignment (expression has type "int", variable has type "str")
1176
1176
main:2: error: Revealed type is 'builtins.str'
1177
1177
1178
+ [case testSymmetricImportCycle1]
1179
+ import a
1180
+ [file a.py]
1181
+ import b
1182
+ def f() -> int:
1183
+ return b.x
1184
+ y = 0 + 0
1185
+ [file b.py]
1186
+ import a
1187
+ def g() -> int:
1188
+ return a.y
1189
+ x = 1 + 1
1190
+
1191
+ [case testSymmetricImportCycle2]
1192
+ import b
1193
+ [file a.py]
1194
+ import b
1195
+ def f() -> int:
1196
+ return b.x
1197
+ y = 0 + 0
1198
+ [file b.py]
1199
+ import a
1200
+ def g() -> int:
1201
+ return a.y
1202
+ x = 1 + 1
1203
+
1204
+
1178
1205
-- Scripts and __main__
1179
1206
1180
1207
[case testScriptsAreModules]
@@ -1191,3 +1218,4 @@ pass
1191
1218
[file b]
1192
1219
pass
1193
1220
[out]
1221
+
You can’t perform that action at this time.
0 commit comments