Fix linting and type errors for CI
All checks were successful
CI / Lint (push) Successful in 4s
CI / Type Check (push) Successful in 16s
CI / Test (push) Successful in 9s
CI / Release (push) Has been skipped

- Use X | None syntax instead of Optional[X] (UP045)
- Sort imports in dashboard app (I001)
- Remove unnecessary UTF-8 encoding argument (UP012)
- Add 'from err' to exception re-raises (B904)
- Remove unused imports in integration tests (F401)
- Fix useless expression in test (B018)
- Cast **1.5 result to float in LDO model (mypy no-any-return)
- Use functools.partial instead of lambda in server (mypy misc)
This commit is contained in:
2025-12-02 16:22:57 +00:00
parent ad8d61b649
commit e36349c853
8 changed files with 14 additions and 15 deletions

View File

@@ -194,7 +194,7 @@ class LDOModel:
# Temperature ratio (reference is approximately 300K ≈ 27°C)
temp_ratio = t_kelvin / 300.0
return self._params.dropout_voltage * (temp_ratio**1.5)
return float(self._params.dropout_voltage * (temp_ratio**1.5))
def is_in_dropout(self, junction_temperature: float) -> bool:
"""Check if the LDO is in dropout at current operating point.