Commit ae9d450
[ty] Fallback to Unknown if no type is stored for an expression (#19517)
## Summary
See discussion at
https://github.com/astral-sh/ruff/pull/19478/files#r2223870292
Fixes astral-sh/ty#865
## Test Plan
Added one mdtest for invalid Callable annotation; removed `pull-types:
skip` from that test file.
Co-authored-by: lipefree <willy.ngo.2000@gmail.com>1 parent c8c80e0 commit ae9d450
File tree
3 files changed
+28
-35
lines changed- crates/ty_python_semantic
- resources
- corpus
- mdtest/annotations
- src/types
3 files changed
+28
-35
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
93 | 106 | | |
94 | 107 | | |
95 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
456 | 455 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
| 456 | + | |
| 457 | + | |
463 | 458 | | |
464 | 459 | | |
465 | 460 | | |
| |||
541 | 536 | | |
542 | 537 | | |
543 | 538 | | |
544 | | - | |
545 | 539 | | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
| 540 | + | |
| 541 | + | |
552 | 542 | | |
553 | 543 | | |
554 | 544 | | |
| |||
675 | 665 | | |
676 | 666 | | |
677 | 667 | | |
678 | | - | |
679 | 668 | | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
| 669 | + | |
| 670 | + | |
686 | 671 | | |
687 | 672 | | |
688 | 673 | | |
| |||
959 | 944 | | |
960 | 945 | | |
961 | 946 | | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
| 947 | + | |
968 | 948 | | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
| 949 | + | |
975 | 950 | | |
976 | 951 | | |
977 | 952 | | |
| |||
0 commit comments