| 1 |
exclude: mkdocs.yml|example_project/static|example_project/templates|example_project_custom_groups/static|example_project_custom_groups/templates|((?:[^/]*/)*)(.svg)|((?:[^/]*/)*)(.xml) |
| 2 |
default_stages: [pre-commit] |
| 3 |
fail_fast: true |
| 4 |
default_language_version: |
| 5 |
python: python3 # force all unspecified python hooks to run python3 |
| 6 |
repos: |
| 7 |
- repo: https://github.com/pre-commit/pre-commit-hooks |
| 8 |
rev: v6.0.0 |
| 9 |
hooks: |
| 10 |
- id: check-added-large-files |
| 11 |
args: [--maxkb=10240] |
| 12 |
- id: check-ast |
| 13 |
- id: check-case-conflict |
| 14 |
- id: check-docstring-first |
| 15 |
- id: check-yaml |
| 16 |
- id: end-of-file-fixer |
| 17 |
- id: no-commit-to-branch |
| 18 |
stages: [manual] |
| 19 |
- id: trailing-whitespace |
| 20 |
|
| 21 |
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks |
| 22 |
rev: v2.15.0 |
| 23 |
hooks: |
| 24 |
# TODO - enable once this is merged: https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/252/files |
| 25 |
# - id: pretty-format-toml |
| 26 |
# args: [--autofix] |
| 27 |
# TODO - remove mkdocs.yml from the `exclude` argument if this gets fixed: https://github.com/macisamuele/language-formatters-pre-commit-hooks/issues/281 |
| 28 |
- id: pretty-format-yaml |
| 29 |
args: [--autofix, --indent, '2'] |
| 30 |
|
| 31 |
- repo: https://github.com/astral-sh/ruff-pre-commit |
| 32 |
rev: v0.12.12 |
| 33 |
hooks: |
| 34 |
- id: ruff |
| 35 |
name: Ruff lint |
| 36 |
args: [--fix, --exit-non-zero-on-fix] |
| 37 |
|
| 38 |
- id: ruff |
| 39 |
name: Ruff isort |
| 40 |
args: [check, --select, I, --fix] |
| 41 |
|
| 42 |
- id: ruff-format |
| 43 |
name: Ruff format |
| 44 |
|
| 45 |
- repo: https://github.com/asottile/pyupgrade |
| 46 |
rev: v3.20.0 |
| 47 |
hooks: |
| 48 |
- id: pyupgrade |
| 49 |
args: [--py310-plus] |