Commit e633140
authored
Do not use outer context for
Fixes #19492.
In #19695 I tried to add another set of heuristics to `any_constraints`,
but can't get that working: trying to join/meet all similar constraints
together breaks inference in other cases, and only doing that for Any
would be somewhat non-trivial. This PR reverts behaviour introduced in
#19492 when LHS of the expression contains `Any`. Outer context is still
included in all other cases, and this seems to strike a good balance.or expr inference if the LHS has Any (#19748)1 parent abd9424 commit e633140
File tree
2 files changed
+14
-0
lines changed- mypy
- test-data/unit
2 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6004 | 6004 | | |
6005 | 6005 | | |
6006 | 6006 | | |
| 6007 | + | |
| 6008 | + | |
| 6009 | + | |
| 6010 | + | |
6007 | 6011 | | |
6008 | 6012 | | |
6009 | 6013 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1530 | 1530 | | |
1531 | 1531 | | |
1532 | 1532 | | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
0 commit comments