Commit c29523a
fix(params): mark test executable and catch float(result) conversion errors
Two follow-up fixes on top of the ConfigurationStepEvalError refactor:
- Set the executable bit on tests/test_data_model_safe_evaluator.py so
ruff stops failing with EXE001 (shebang present but file not
executable). The file was created with a shebang matching other
tests; only the git mode bit was missing.
- Extend the outer except in compute_parameters to also catch
ValueError and TypeError. The Par(float(result), ...) call on the
non-eval path can raise either when result is a string that came
from a values/Bitmask lookup but is not numerically convertible, or
when the dict lookup returned an unexpected type. Without these,
conversion errors escaped both try blocks and could abort the
configuration-step load. SyntaxError, NameError, KeyError, and
StopIteration remain for defensive coverage of the surrounding
code paths.
Signed-off-by: Yash Goel <yashvardhan664@gmail.com>1 parent a4e62f5 commit c29523a
2 files changed
Lines changed: 1 addition & 1 deletion
File tree
- ardupilot_methodic_configurator
- tests
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
File mode changed.
0 commit comments