Debian Codegraph @

.pre-commit-config.yaml

raw
1 # disable autofixing PRs, commenting "pre-commit.ci autofix" on a pull request triggers a autofix
2 ci:
3 autofix_prs: false
4 repos:
5 - repo: https://github.com/pre-commit/pre-commit-hooks
6 rev: v6.0.0
7 hooks:
8 # standard end of line/end of file cleanup
9 - id: mixed-line-ending
10 - id: end-of-file-fixer
11 - id: trailing-whitespace
12 # ensure syntaxes are valid
13 - id: check-toml
14 - id: check-yaml
15 exclude: ^(conda\.)?recipe/meta.yaml
16 # catch git merge/rebase problems
17 - id: check-merge-conflict
18 # sort requirements files
19 - id: file-contents-sorter
20 files: |
21 (?x)^(
22 docs/requirements.txt |
23 tests/requirements.*\.txt
24 )
25 args: [--unique]
26 - repo: https://github.com/adamchainz/blacken-docs
27 rev: 1.20.0
28 hooks:
29 # auto format Python codes within docstrings
30 - id: blacken-docs
31 - repo: https://github.com/astral-sh/ruff-pre-commit
32 rev: v0.16.5
33 hooks:
34 # lint & attempt to correct failures (e.g. pyupgrade)
35 - id: ruff-check
36 args: [--fix]
37 # compatible replacement for black
38 - id: ruff-format
39 - repo: https://github.com/python-jsonschema/check-jsonschema
40 rev: 0.38.0
41 hooks:
42 # verify github syntaxes
43 - id: check-github-workflows
44 - id: check-dependabot
45 - repo: meta
46 # see https://pre-commit.com/#meta-hooks
47 hooks:
48 - id: check-hooks-apply
49 - id: check-useless-excludes