Commit ce4f324
refactor: consolidate display overrides and add field validation asserts
Phase 3 of dynamic typing hardening:
- Remove duplicate _FIRE_MODE_DISPLAY and _FLAME_COLOR_DISPLAY dicts
from cli.py, replacing with centralized display_name() from models.py
- Remove duplicate _MODE_DISPLAY dict from tui/widgets.py
- Add module-level assert validating _FEATURE_LABELS field names
against FireFeatures dataclass fields
- Add module-level assert validating _FLAME_EFFECT_SETTERS field
names against FlameEffectParam dataclass fields
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent a6a0625 commit ce4f324
2 files changed
Lines changed: 13 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 58 | | |
70 | 59 | | |
71 | 60 | | |
| |||
129 | 118 | | |
130 | 119 | | |
131 | 120 | | |
132 | | - | |
| 121 | + | |
133 | 122 | | |
134 | 123 | | |
135 | 124 | | |
| |||
145 | 134 | | |
146 | 135 | | |
147 | 136 | | |
148 | | - | |
| 137 | + | |
149 | 138 | | |
150 | 139 | | |
151 | 140 | | |
| |||
286 | 275 | | |
287 | 276 | | |
288 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
289 | 282 | | |
290 | 283 | | |
291 | 284 | | |
| |||
408 | 401 | | |
409 | 402 | | |
410 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
411 | 409 | | |
412 | 410 | | |
413 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 125 | | |
132 | 126 | | |
133 | 127 | | |
| |||
136 | 130 | | |
137 | 131 | | |
138 | 132 | | |
139 | | - | |
| 133 | + | |
140 | 134 | | |
141 | 135 | | |
142 | 136 | | |
| |||
0 commit comments