Commit 457747d
refactor: delegate _attribute_is_optional to types._is_optional
Address review feedback on #295. Removes the duplicated dual-origin
check from _attribute_is_optional; the two functions now share the
single implementation in types._is_optional.
Minor semantic tightening: Union[A, B, None]-style fields (3+ args)
now return False from _attribute_is_optional, matching _is_optional's
exactly-two-args rule. Tracked separately in a follow-up issue.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9a07c80 commit 457747d
1 file changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
| 493 | + | |
498 | 494 | | |
499 | 495 | | |
500 | 496 | | |
| |||
0 commit comments