Asib27's picture
try 1
065fee7 verified
raw
history blame
2.93 kB
repos:
- repo: local
hooks:
- id: changelogs-rst
name: changelog filenames
language: fail
entry: >-
Changelog files must be named
####.(
bugfix
| feature
| deprecation
| breaking
| doc
| packaging
| contrib
| misc
)(.#)?(.rst)?
exclude: >-
(?x)
^
CHANGES/(
\.gitignore
|(\d+|[0-9a-f]{8}|[0-9a-f]{7}|[0-9a-f]{40})\.(
bugfix
|feature
|deprecation
|breaking
|doc
|packaging
|contrib
|misc
)(\.\d+)?(\.rst)?
|README\.rst
|\.TEMPLATE\.rst
)
$
files: ^CHANGES/
- id: changelogs-user-role
name: Changelog files should use a non-broken :user:`name` role
language: pygrep
entry: :user:([^`]+`?|`[^`]+[\s,])
pass_filenames: true
types: [file, rst]
- id: check-changes
name: Check CHANGES
language: system
entry: ./tools/check_changes.py
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.6.0'
hooks:
- id: check-merge-conflict
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/PyCQA/isort
rev: '5.13.2'
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: '24.4.0'
hooks:
- id: black
language_version: python3 # Should be a command that runs python
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.6.0'
hooks:
- id: end-of-file-fixer
exclude: >-
^docs/[^/]*\.svg$
- id: requirements-txt-fixer
files: requirements/.*\.in$
- id: trailing-whitespace
- id: file-contents-sorter
args: ['--ignore-case']
files: |
CONTRIBUTORS.txt|
docs/spelling_wordlist.txt|
.gitignore|
.gitattributes
- id: check-case-conflict
- id: check-json
- id: check-xml
- id: check-executables-have-shebangs
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: check-added-large-files
- id: check-symlinks
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: ['--remove']
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
exclude: ^examples/
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.15.2'
hooks:
- id: pyupgrade
args: ['--py37-plus']
- repo: https://github.com/PyCQA/flake8
rev: '7.0.0'
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.6.0
- flake8-requirements==1.7.8
exclude: "^docs/"
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
files: >-
^[^/]+[.]rst$
exclude: >-
^CHANGES\.rst$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli