You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2833062
Browse filesBrowse the repository at this point in the historyBrowse files
This fixes crashes and at least one edge case. Not sure if
all the patch callbacks are necessary when propagating
fine-grained dependencies, but it seems safer to invoke
them all.
Fixes#4657.
Copy file name to clipboardExpand all lines: test-data/unit/fine-grained.test
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2475,3 +2475,37 @@ else:
2475
2475
[builtins fixtures/ops.pyi]
2476
2476
[out]
2477
2477
==
2478
+
2479
+
[case testNamedTupleWithinFunction]
2480
+
from typing import NamedTuple
2481
+
import b
2482
+
def f() -> None:
2483
+
b.x
2484
+
n = NamedTuple('n', [])
2485
+
[file b.py]
2486
+
x = 0
2487
+
[file b.py.2]
2488
+
x = ''
2489
+
[out]
2490
+
==
2491
+
2492
+
[case testNamedTupleFallback]
2493
+
# This test will fail without semantic analyzer pass 2 patches
2494
+
import a
2495
+
[file a.py]
2496
+
import b
2497
+
[file b.py]
2498
+
from typing import NamedTuple
2499
+
import c
2500
+
c.x
2501
+
class N(NamedTuple):
2502
+
count: int
2503
+
[file c.py]
2504
+
x = 0
2505
+
[file c.py.2]
2506
+
x = ''
2507
+
[builtins fixtures/tuple.pyi]
2508
+
[out]
2509
+
b.py:5: error: Incompatible types in assignment (expression has type "int", base class "tuple" defined the type as "Callable[[Tuple[int, ...], Any], int]")
2510
+
==
2511
+
b.py:5: error: Incompatible types in assignment (expression has type "int", base class "tuple" defined the type as "Callable[[Tuple[int, ...], Any], int]")
0 commit comments