Add bug-finding lint to the checks

Run ruff with pyflakes, syntax-error and bugbear rules only (no style
rules) over the integration, tests and scripts as part of check.sh and
CI. The codebase passes as is. Target Python 3.9 because the offline
tests are also run on older interpreters, which also leaves out the
zip(strict=) rule that needs 3.10. ruff 0.14.0 pinned in both test
requirement files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
buzeraandClaude Opus 5.5 committed 2026-10-26 22:29:20 +02:00
1 parent ec3a0738fe
commit ace6d0061b
4 files changed
+11

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
# Newest published fixtures: Home Assistant 2026.2.3; requires Python 3.13.
# Update together with the README's tested-versions note.
pytest-homeassistant-custom-component==0.13.316
# Bug-finding lint (see ruff.toml).
ruff==0.14.0
+2
View File
@@ -2,3 +2,5 @@
pytest-homeassistant-custom-component==0.13.298
# aiodns 3.5 (HA's pin) uses APIs removed in pycares 5.
pycares==4.11.0
# Bug-finding lint (see ruff.toml).
ruff==0.14.0
+6
View File
@@ -0,0 +1,6 @@
# Bug-finding lint only (pyflakes, syntax errors, bugbear); no style rules.
# py39: the offline tests also run on older Pythons, so e.g. zip(strict=) is not available.
target-version = "py39"
[lint]
select = ["F", "E9", "B"]
+1
View File
@@ -4,6 +4,7 @@ set -eu
# A transitive HA test dependency otherwise fetches metadata on import.
export LITELLM_LOCAL_MODEL_COST_MAP=True
python -m pip check
python -m ruff check --no-cache .
python -m unittest discover -s tests -v
python -m pytest tests/ha -q
python -m compileall -q custom_components/heating_mpc