- 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.
19 lines
372 B
YAML
19 lines
372 B
YAML
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: pytest
|
|
name: pytest
|
|
entry: pytest
|
|
language: system
|
|
types: [python]
|
|
pass_filenames: false
|
|
always_run: true
|
|
stages: [commit]
|