| 1 |
default_install_hook_types: |
| 2 |
- pre-commit |
| 3 |
- commit-msg |
| 4 |
- pre-push |
| 5 |
|
| 6 |
default_stages: |
| 7 |
- pre-commit |
| 8 |
|
| 9 |
repos: |
| 10 |
- repo: meta |
| 11 |
hooks: |
| 12 |
- id: check-hooks-apply |
| 13 |
- id: check-useless-excludes |
| 14 |
|
| 15 |
- repo: https://github.com/pre-commit/pre-commit-hooks |
| 16 |
rev: v5.0.0 |
| 17 |
hooks: |
| 18 |
- id: check-vcs-permalinks |
| 19 |
- id: end-of-file-fixer |
| 20 |
exclude: "tests/((commands|data|providers/test_uv_provider)/|test_).+" |
| 21 |
- id: trailing-whitespace |
| 22 |
args: [ --markdown-linebreak-ext=md ] |
| 23 |
exclude: '\.svg$' |
| 24 |
- id: debug-statements |
| 25 |
- id: no-commit-to-branch |
| 26 |
- id: check-merge-conflict |
| 27 |
- id: check-toml # TOML linter (syntax checker) |
| 28 |
- id: check-yaml |
| 29 |
args: [ '--unsafe' ] # for mkdocs.yml |
| 30 |
- id: detect-private-key |
| 31 |
|
| 32 |
- repo: https://github.com/astral-sh/uv-pre-commit |
| 33 |
rev: 0.9.18 |
| 34 |
hooks: |
| 35 |
- id: uv-lock |
| 36 |
- id: uv-sync |
| 37 |
args: [ --frozen, --all-groups ] |
| 38 |
stages: [ pre-commit, post-checkout, post-merge, post-rewrite ] |
| 39 |
|
| 40 |
- repo: https://github.com/asottile/blacken-docs |
| 41 |
rev: 1.19.1 |
| 42 |
hooks: |
| 43 |
- id: blacken-docs |
| 44 |
additional_dependencies: [ black~=23.11 ] |
| 45 |
|
| 46 |
- repo: https://github.com/codespell-project/codespell |
| 47 |
rev: v2.4.1 |
| 48 |
hooks: |
| 49 |
- id: codespell |
| 50 |
name: Run codespell to check for common misspellings in files |
| 51 |
# config section is within pyproject.toml |
| 52 |
language: python |
| 53 |
types: [ text ] |
| 54 |
args: [ "--write-changes" ] |
| 55 |
additional_dependencies: |
| 56 |
- tomli |
| 57 |
|
| 58 |
- repo: https://github.com/commitizen-tools/commitizen |
| 59 |
rev: v4.19.0 # automatically updated by Commitizen |
| 60 |
hooks: |
| 61 |
- id: commitizen |
| 62 |
- id: commitizen-branch |
| 63 |
stages: |
| 64 |
- post-commit |
| 65 |
|
| 66 |
- repo: https://github.com/ComPWA/taplo-pre-commit |
| 67 |
rev: v0.9.3 |
| 68 |
hooks: |
| 69 |
- id: taplo-format |
| 70 |
|
| 71 |
- repo: local |
| 72 |
hooks: |
| 73 |
- id: format |
| 74 |
name: Format Python code |
| 75 |
language: system |
| 76 |
pass_filenames: false |
| 77 |
entry: uv run --no-sync poe format |
| 78 |
types: [ python ] |
| 79 |
|
| 80 |
- id: linter and test |
| 81 |
name: Linters |
| 82 |
language: system |
| 83 |
pass_filenames: false |
| 84 |
entry: uv run --no-sync poe lint |
| 85 |
types: [ python ] |