|
| 1 | +--- |
| 2 | +ci: |
| 3 | + skip: [pipenv, mypy] |
| 4 | + |
| 5 | +# See https://pre-commit.com for more information |
| 6 | +# See https://pre-commit.com/hooks.html for more hooks |
| 7 | +minimum_pre_commit_version: 4.0.0 |
| 8 | +default_stages: [pre-commit] |
| 9 | +repos: |
| 10 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 11 | + rev: v5.0.0 |
| 12 | + hooks: |
| 13 | + - id: check-added-large-files |
| 14 | + - id: check-case-conflict |
| 15 | + - id: check-merge-conflict |
| 16 | + - id: trailing-whitespace |
| 17 | + - id: check-toml |
| 18 | + - id: end-of-file-fixer |
| 19 | + - id: mixed-line-ending |
| 20 | + - id: check-yaml |
| 21 | + - id: pretty-format-json |
| 22 | + - id: detect-private-key |
| 23 | + - id: debug-statements |
| 24 | + |
| 25 | + - repo: https://github.com/psf/black |
| 26 | + rev: 25.1.0 |
| 27 | + hooks: |
| 28 | + - id: black |
| 29 | + entry: black --config pyproject.toml . |
| 30 | + |
| 31 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 32 | + rev: v0.9.6 |
| 33 | + hooks: |
| 34 | + - id: ruff |
| 35 | + args: [--fix, --exit-non-zero-on-fix, --respect-gitignore, --show-fixes] |
| 36 | + |
| 37 | + - repo: https://github.com/rstcheck/rstcheck |
| 38 | + rev: v6.2.4 |
| 39 | + hooks: |
| 40 | + - id: rstcheck |
| 41 | + additional_dependencies: [sphinx, toml] |
| 42 | + |
| 43 | + - repo: local |
| 44 | + hooks: |
| 45 | + - id: pipenv |
| 46 | + stages: [pre-commit, manual] |
| 47 | + language: system |
| 48 | + name: Install dependencies for the local linters |
| 49 | + entry: bash -c "pip install pipenv && pipenv install --dev" |
| 50 | + types_or: |
| 51 | + - python |
| 52 | + - toml # Pipfile |
| 53 | + pass_filenames: false |
| 54 | + - id: mypy |
| 55 | + stages: [pre-commit, manual] |
| 56 | + name: mypy |
| 57 | + entry: pipenv run mypy . |
| 58 | + language: system |
| 59 | + types_or: |
| 60 | + - python |
| 61 | + - toml # Pipfile |
| 62 | + pass_filenames: false |
0 commit comments