Repository navigation
Commit 52a6a41
examples: stop re-annotating
`for format in [...]` at line 43 defines `format` as str; the later annotated
assignment `format: Literal[\"NETCDF3_CLASSIC\"] = ...` is a re-annotation that
mypy >= 2.0.0 rejects ([no-redef]), and the lost annotation then makes the
`write_netcdf(format=format)` call fail [arg-type]. This keeps the Literal
annotation the call needs but gives the second variable its own name.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>format in bench_diskless.py (mypy 2.0 no-redef)1 parent 6e67576 commit 52a6a41
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
0 commit comments