Commit 8240b83
committed
Carry Literal default values in Param D generic
For simple default types (None, int, str, bytes, bool, enum), store
D = Literal[value] instead of D = ann_type, allowing real values to be
extracted when converting back to inspect.Signature.1 parent cb7005e commit 8240b83
2 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
412 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
413 | 420 | | |
414 | 421 | | |
415 | 422 | | |
| |||
565 | 572 | | |
566 | 573 | | |
567 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
568 | 583 | | |
569 | 584 | | |
570 | 585 | | |
571 | 586 | | |
572 | 587 | | |
573 | | - | |
| 588 | + | |
574 | 589 | | |
575 | 590 | | |
576 | 591 | | |
| |||
0 commit comments