Adopt shared ruff rule set (B, N, UP, SIM, C4) and fix findings #3
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/ruff-rule-set"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rule set from workflow-basics
templates/ruff.toml(workflow-basics MR #7). 13 findings, all fixed, no suppressions.Bugs (each with a test that fails on main, 5 of 7 new tests fail there):
water_heater.target_temperature:if "DomesticHotWaterTemperatureHeating":was always true. KeyError on units without that key,TargetTemperaturenever used.water_heater.async_toggle: called thecurrent_operationproperty (TypeError).sensor.ConsumptionSensor.extra_state_attributes: month loop was dedented out of itsif, so unknown content names raised UnboundLocalError and "Day" ran the loop twice.Lint:
get_HWT_device_info/HWT_device_inforenamed to snake case (internal API),asyncio.TimeoutErrortoTimeoutError, f-string,zip(strict=True)(key list is built from the content length), tuple default forstates, simplified conditionals.Verified on python 3.14, homeassistant 2026.10.1, pyaltherma v0.1.1: ruff check, ruff format, bandit, 16 tests pass.
Merge after workflow-basics #7 is not required (ruff.toml is a copy).
🤖 Generated with Claude Code
https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98