Skip to content

chore: add pre-commit config running ruff - #10

Merged
michaeln31 merged 1 commit into
developfrom
chore/pre-commit-ruff
Jul 7, 2026
Merged

chore: add pre-commit config running ruff#10
michaeln31 merged 1 commit into
developfrom
chore/pre-commit-ruff

Conversation

@michaeln31

Copy link
Copy Markdown
Owner

What

Adds a .pre-commit-config.yaml so the same ruff lint/format rules CI enforces
also run locally before push.

Why

Mirrors the CI lint job exactly so local == CI:

  • ruff pinned to v0.15.0 (matches requirements-dev.txt / CI's ruff==0.15.0).
  • Both hooks (ruff lint + ruff-format) pass --config custom_components/andersen_ev/ruff.toml.
  • Hooks scoped to the integration source via files: ^custom_components/andersen_ev/.*\.py$.
  • No --fix on the lint hook, keeping behavior aligned with CI's check-only intent.

Changes

  • .pre-commit-config.yaml — new pre-commit config with the two ruff hooks.
  • README.md — short Development / pre-commit note (pip install pre-commit, pre-commit install).
  • requirements-dev.txt — add unpinned pre-commit so the tool installs with the dev deps.

No CI YAML, production code, or manifest/quality-scale changes.

@michaeln31
michaeln31 merged commit bfedbe2 into develop Jul 7, 2026
6 of 7 checks passed
@michaeln31
michaeln31 deleted the chore/pre-commit-ruff branch July 7, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant