chore: update pre-commit to use ruff with auto-fix

- Add astral-sh/ruff-pre-commit as official ruff hook
- Enable ruff with --fix for automatic linting fixes
- Add ruff-format for code formatting
- Keep pytest hook for test running

Now pre-commit will automatically fix linting issues and run tests before commits.
This commit is contained in:
Daniel Wagner 2026-07-26 12:52:28 +10:00
parent 2454d3a956
commit 4cf28ef582

View File

@ -1,13 +1,13 @@
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: local - repo: local
hooks: hooks:
- id: ruff-check
name: ruff check
entry: ruff check
language: system
types: [python]
stages: [commit]
- id: pytest - id: pytest
name: pytest name: pytest
entry: pytest entry: pytest