Repository navigation
Commit f909592
committed
Fix model_type coercion in Engine parser
Adjust `Engine.from_model_type` to normalize non-string `model_type` values by converting either `.value` or the original object with `str(...)` in a single step. This avoids eager fallback conversion inside `getattr` and makes enum-like inputs more reliably coercible.1 parent 42bbb1f commit f909592
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
0 commit comments