chore: add pre-commit hook to catch lint errors before push

Adds ruff pre-commit hook that auto-fixes and formats on every commit,
preventing lint CI failures from reaching GitHub.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-04-13 13:40:22 +01:00
parent b01598753d
commit 238ad7936a
2 changed files with 8 additions and 0 deletions

7
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

View File

@@ -10,6 +10,7 @@ pytest-mock>=3.15.1
ruff>=0.1.0
black>=23.0.0
mypy>=1.0.0
pre-commit>=3.0.0
# Type stubs
types-flask>=1.1.0