v1.6.0 - Ruff, mypy strict, pre-commit
Code quality tooling
Three new quality gates run on every push and pull request:
- Ruff (linter + formatter) configured with the same rule set Home Assistant core enforces internally. Catches unused imports, async pitfalls, security smells, naming, pyupgrade opportunities. Auto-formats the whole codebase.
- Mypy strict passes on every module of the integration. The HA / aiohttp boundary remains permissive (those packages don't ship full stubs) but our own code is fully typed.
- Pre-commit hooks mirror the CI checks so issues are caught locally before pushing.
Code changes triggered by the linters
- Renamed
EauxDeMarseilleeSensortoEauxDeMarseilleSensor(typo with double 'e'). - Replaced
asyncio.TimeoutErrorwith the built-inTimeoutError(Python 3.11+). - Replaced
datetime.timezone.utcwith thedatetime.UTCalias. - Use
logging.exceptioninstead oflogging.errorinexceptblocks where the exception object would otherwise be lost. - Replace
assert self._reauth_entry is not Nonewith an explicitRuntimeError; asserts get stripped underpython -O. - Add explicit return-type annotations for values mypy could only infer as
Any.
CI matrix
- Lint (ruff) — checks linting and formatting
- Typecheck (mypy strict) — full type analysis
- Pytest (Python 3.12 + 3.13) — 42 tests, 98% coverage, 95% threshold
- Hassfest — HA manifest and structure validation
- HACS — repository compliance
No user-facing change. Update via HACS as usual.