Commit 427872b
[ty] Add ParamSpec context to missing argument diagnostics
When a ParamSpec callable is called without the required `*args` or
`**kwargs`, the error message now includes a sub-diagnostic explaining
why these arguments are required. This addresses reviewer feedback
from PR #22820 about making it clearer why these parameters are
required in some cases and not in others.
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent c62dad5 commit 427872b
3 files changed
Lines changed: 114 additions & 1 deletion
File tree
- crates/ty_python_semantic
- resources/mdtest
- diagnostics
- snapshots
- src/types/call
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 73 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3045 | 3045 | | |
3046 | 3046 | | |
3047 | 3047 | | |
| 3048 | + | |
3048 | 3049 | | |
3049 | 3050 | | |
3050 | 3051 | | |
| |||
4215 | 4216 | | |
4216 | 4217 | | |
4217 | 4218 | | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
4218 | 4223 | | |
4219 | 4224 | | |
4220 | 4225 | | |
| |||
4554 | 4559 | | |
4555 | 4560 | | |
4556 | 4561 | | |
4557 | | - | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
4558 | 4566 | | |
4559 | 4567 | | |
4560 | 4568 | | |
| |||
4581 | 4589 | | |
4582 | 4590 | | |
4583 | 4591 | | |
| 4592 | + | |
| 4593 | + | |
| 4594 | + | |
| 4595 | + | |
| 4596 | + | |
| 4597 | + | |
| 4598 | + | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
4584 | 4602 | | |
4585 | 4603 | | |
4586 | 4604 | | |
| |||
0 commit comments