Commit 12ff712
refactor(argparse): use 'is' pattern for Some-or-noop match blocks (3 files)
Same shape as #3533 but in three other argparse files:
- `parser.mbt`: `match cmd.build_error { Some(err) => raise err; None => () }` and `match parent_matches.parsed_subcommand { Some(...) => big-block; None => () }`
- `parser_validate.mbt`: `match cmd.build_error { Some(err) => raise err; None => () }`
- `help_render.mbt`: `match arg.env { Some(env_name) => notes.push(...); None => () }`
Replaced with `if X is Some(y) { ... }` form.
Semantics-preserving: `moon test -p argparse` (225/225) passes and
`moon info` produces no `.mbti` change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2cdcfa8 commit 12ff712
3 files changed
Lines changed: 12 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
353 | | - | |
354 | | - | |
| 352 | + | |
| 353 | + | |
355 | 354 | | |
356 | 355 | | |
357 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | | - | |
344 | | - | |
| 342 | + | |
| 343 | + | |
345 | 344 | | |
346 | 345 | | |
347 | 346 | | |
| |||
588 | 587 | | |
589 | 588 | | |
590 | 589 | | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
600 | 596 | | |
601 | 597 | | |
602 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
| 97 | + | |
| 98 | + | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
0 commit comments