Skip to content

Commit

Permalink
Keep hook-repos in id order for easy template comparison. (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo authored Nov 15, 2024
1 parent 6cd87da commit 4d53783
Showing 1 changed file with 32 additions and 26 deletions.
58 changes: 32 additions & 26 deletions templates/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ files: |
minimum_pre_commit_version: 1.21.0

repos:

# Hook for pre-commit's built-in checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand Down Expand Up @@ -50,14 +52,14 @@ repos:
# Duplicates Ruff W291 but also works on non-Python files.
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.4"
# Hooks from all other repos
# NOTE : keep these in hook-name (aka 'id') order

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: ruff
types: [file, python]
args: [--fix, --show-fixes]
- id: ruff-format
types: [file, python]
- id: blacken-docs
types: [file, rst]

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.6"
Expand All @@ -66,29 +68,32 @@ repos:
types_or: [asciidoc, python, markdown, rst]
additional_dependencies: [tomli]

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
hooks:
- id: blacken-docs
types: [file, rst]
- id: mypy
exclude: 'noxfile\.py|docs/conf\.py'

- repo: https://github.com/aio-libs/sort-all
rev: v1.2.0
- repo: https://github.com/numpy/numpydoc
rev: v1.7.0
hooks:
- id: sort-all
- id: numpydoc-validation
types: [file, python]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.4"
hooks:
- id: mypy
exclude: 'noxfile\.py|docs/conf\.py'
- id: ruff
types: [file, python]
args: [--fix, --show-fixes]
- id: ruff-format
types: [file, python]

- repo: https://github.com/abravalheri/validate-pyproject
# More exhaustive than Ruff RUF200.
rev: "v0.18"
- repo: https://github.com/aio-libs/sort-all
rev: v1.2.0
hooks:
- id: validate-pyproject
- id: sort-all
types: [file, python]

- repo: https://github.com/scientific-python/cookie
rev: 2024.04.23
Expand All @@ -97,8 +102,9 @@ repos:
additional_dependencies: ["repo-review[cli]"]
args: ["--show=errskip"]

- repo: https://github.com/numpy/numpydoc
rev: v1.7.0
- repo: https://github.com/abravalheri/validate-pyproject
# More exhaustive than Ruff RUF200.
rev: "v0.18"
hooks:
- id: numpydoc-validation
types: [file, python]
- id: validate-pyproject

0 comments on commit 4d53783

Please sign in to comment.