repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.14 hooks: - id: ruff name: ruff lint (src only) files: ^src/.*\.py$ args: [--fix, --exit-non-zero-on-fix] exclude: | (?x)^( src/.*/migrations/.*| src/.*/__pycache__/.* )$ - id: ruff-format name: ruff format (src only) files: ^src/.*\.py$ args: [] exclude: | (?x)^( src/.*/migrations/.*| src/.*/__pycache__/.* )$ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: trailing-whitespace name: check trailing whitespace (src only) files: ^src/.*\.(py|txt|md|yaml|yml)$ - id: end-of-file-fixer name: fix end of file (src only) files: ^src/.*\.(py|txt|md|yaml|yml)$ - id: check-yaml name: check yaml syntax (src only) files: ^src/.*\.ya?ml$ - id: check-added-large-files name: check large files args: ["--maxkb=500"] - repo: local hooks: - id: django-check-migrations name: django check migrations entry: ./scripts/check-migrations.sh language: script files: ^src/.*\.py$ pass_filenames: false exclude: | (?x)^( src/.*/migrations/.*| src/.*/__pycache__/.* )$