-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
114 lines (100 loc) · 2.39 KB
/
.pre-commit-config.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
repos:
#
# Fail fast
#
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
fail_fast: true
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# General
- id: check-merge-conflict
fail_fast: true
- id: check-case-conflict
fail_fast: true
- id: destroyed-symlinks
fail_fast: true
- id: check-symlinks
fail_fast: true
- id: check-added-large-files
fail_fast: true
# Syntax
- id: check-toml
fail_fast: true
- id: check-json
fail_fast: true
exclude: |
(?x)(
^data/|
^output/|
^docs-gen/|
^docs/|
mkdocs.yaml|
mkgendocs.yml
)
- id: check-yaml
fail_fast: false
exclude: |
(?x)(
^data/|
^output/|
^docs-gen/|
^docs/|
mkdocs.yaml|
mkgendocs.yml
)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
fail_fast: true
#
# Modifiers
#
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.7.0
hooks:
- id: setup-cfg-fmt
args: ["--include-version-classifiers"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/dannysepler/rm_unneeded_f_str
rev: v0.2.0
hooks:
- id: rm-unneeded-f-str
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Last modifier: Coding Standard
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
#
# Static Checks
#
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
# Python
- id: python-use-type-annotations
- id: python-no-log-warn
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: debug-statements
- id: check-builtin-literals
- id: check-docstring-first