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 # generic verification and formatting
6 - repo: https://github.com/pre-commit/pre-commit-hooks
7 rev: v6.0.0
8 hooks:
9 # ensure syntaxes are valid
10 - id: check-toml
11 - id: check-yaml
12 exclude: ^(conda\.)?recipe/meta.yaml
13 # catch git merge/rebase problems
14 - id: check-merge-conflict
15 # sort requirements files
16 - id: file-contents-sorter
17 files: |
18 (?x)^(
19 docs/requirements.txt |
20 tests/requirements.*\.txt
21 )
22 args: [--unique]
23 # other
24 - id: check-added-large-files
25 - id: check-ast
26 - id: fix-byte-order-marker
27 - id: check-case-conflict
28 - id: check-merge-conflict
29 - id: check-shebang-scripts-are-executable
30 - id: debug-statements
31 - id: detect-private-key
32 - repo: https://github.com/adamchainz/blacken-docs
33 rev: 1.20.0
34 hooks:
35 # auto format Python codes within docstrings
36 - id: blacken-docs
37 - repo: https://github.com/astral-sh/ruff-pre-commit
38 rev: v0.15.15
39 hooks:
40 # lint & attempt to correct failures (e.g. pyupgrade)
41 - id: ruff-check
42 args: [--fix]
43 # compatible replacement for black
44 - id: ruff-format
45 - repo: https://github.com/python-jsonschema/check-jsonschema
46 rev: 0.37.2
47 hooks:
48 # verify github syntaxes
49 - id: check-github-workflows
50 - id: check-dependabot
51 - repo: meta
52 # see https://pre-commit.com/#meta-hooks
53 hooks:
54 - id: check-hooks-apply
55 - id: check-useless-excludes