- Add .pre-commit-config.yaml with ruff and black hooks - Add pre-commit git hook script as fallback - Add pre-commit to requirements-dev.txt Running 'pre-commit install' will auto-lint on every commit.
26 lines
705 B
YAML
26 lines
705 B
YAML
# Pre-commit hooks for vault-dash
|
|
# Install: pip install pre-commit && pre-commit install
|
|
repos:
|
|
# Ruff - fast Python linter
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.11.2
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix, --exit-non-zero-on-fix]
|
|
files: ^(app|tests|scripts)/
|
|
|
|
# Black - Python formatter
|
|
- repo: https://github.com/psf/black
|
|
rev: 25.1.0
|
|
hooks:
|
|
- id: black
|
|
files: ^(app|tests|scripts)/
|
|
|
|
# Type checking with mypy (optional, slower)
|
|
# Uncomment to enable:
|
|
# - repo: https://github.com/pre-commit/mirrors-mypy
|
|
# rev: v1.15.0
|
|
# hooks:
|
|
# - id: mypy
|
|
# args: [--ignore-missing-imports]
|
|
# files: ^app/ |