-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (55 loc) · 1.64 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (55 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# disable autofixing PRs, commenting "pre-commit.ci autofix" on a pull request triggers a autofix
ci:
autofix_prs: false
repos:
# generic verification and formatting
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# ensure syntaxes are valid
- id: check-toml
- id: check-yaml
exclude: ^(conda\.)?recipe/meta.yaml
# catch git merge/rebase problems
- id: check-merge-conflict
# sort requirements files
- id: file-contents-sorter
files: |
(?x)^(
docs/requirements.txt |
tests/requirements.*\.txt
)
args: [--unique]
# other
- id: check-added-large-files
- id: check-ast
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: debug-statements
- id: detect-private-key
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.20.0
hooks:
# auto format Python codes within docstrings
- id: blacken-docs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.5
hooks:
# lint & attempt to correct failures (e.g. pyupgrade)
- id: ruff-check
args: [--fix]
# compatible replacement for black
- id: ruff-format
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.0
hooks:
# verify github syntaxes
- id: check-github-workflows
- id: check-dependabot
- repo: meta
# see https://pre-commit.com/#meta-hooks
hooks:
- id: check-hooks-apply
- id: check-useless-excludes