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:
parent
2454d3a956
commit
4cf28ef582
@ -1,13 +1,13 @@
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.4.10
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
- id: ruff-format
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
name: ruff check
|
||||
entry: ruff check
|
||||
language: system
|
||||
types: [python]
|
||||
stages: [commit]
|
||||
|
||||
- id: pytest
|
||||
name: pytest
|
||||
entry: pytest
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user