@@ -537,7 +537,7 @@ def func2() -> str:
537
537
return "foo"
538
538
539
539
[rechecked mod0, mod1, mod2]
540
- [stale mod2]
540
+ [stale mod0, mod2]
541
541
[out2]
542
542
tmp/mod1.py:4: error: Incompatible return value type (got "str", expected "int")
543
543
@@ -1113,7 +1113,7 @@ val = "foo"
1113
1113
1114
1114
[builtins fixtures/module_all.pyi]
1115
1115
[rechecked main, c, c.submodule]
1116
- [stale]
1116
+ [stale c ]
1117
1117
[out2]
1118
1118
tmp/c/submodule.py:2: error: Incompatible types in assignment (expression has type "str", variable has type "int")
1119
1119
tmp/main.py:7: error: "C" has no attribute "foo"
@@ -1347,7 +1347,7 @@ class C:
1347
1347
def foo(self) -> int: return 1
1348
1348
1349
1349
[rechecked mod3, mod2, mod1]
1350
- [stale mod3, mod2 ]
1350
+ [stale mod3]
1351
1351
[out1]
1352
1352
tmp/mod3.py:5: error: Incompatible types in assignment (expression has type "str", variable has type "int")
1353
1353
tmp/mod1.py:3: error: Revealed type is 'builtins.int'
@@ -1429,7 +1429,7 @@ class C:
1429
1429
def foo(self) -> str: return 'a'
1430
1430
1431
1431
[rechecked mod4, mod3, mod2, mod1]
1432
- [stale mod4, mod3, mod2 ]
1432
+ [stale mod4, mod3]
1433
1433
[out1]
1434
1434
tmp/mod3.py:5: error: Incompatible types in assignment (expression has type "str", variable has type "int")
1435
1435
tmp/mod1.py:3: error: Revealed type is 'builtins.int'
@@ -3435,14 +3435,21 @@ extra = 1
3435
3435
3436
3436
[case testErrorsAffectDependentsOnly]
3437
3437
# cmd: mypy -m m.a m.b m.c
3438
+
3438
3439
[file m/__init__.py]
3440
+
3439
3441
[file m/a.py]
3440
3442
1 + '' # Deliberate error
3443
+
3441
3444
[file m/b.py]
3442
3445
import m.a # Depends on module with error
3446
+
3443
3447
[file m/c.py]
3444
3448
import m # No error here
3449
+
3445
3450
[rechecked m.a, m.b]
3451
+ [stale]
3452
+
3446
3453
[out1]
3447
3454
tmp/m/a.py:1: error: Unsupported operand types for + ("int" and "str")
3448
3455
[out2]
0 commit comments