-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
168 lines (157 loc) · 4.74 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
repos:
# 代码静态检查 - 检查问题代码
- repo: local
hooks:
- id: poetry-check
name: poetry-check
language: system
pass_filenames: false
entry: poetry check
files: ^(pyproject.toml|poetry.lock)$
- id: poetry-export
name: poetry-export
language: system
pass_filenames: false
entry: poetry export -f requirements.txt -o requirements.txt --without-hashes
files: ^(pyproject.toml|poetry.lock)$
- id: black
name: black
entry: black
language: python
types: [python]
exclude: |
(?x)(
^mdbs/.*
| migrate/versions/.*
)
- id: autoflake
name: autoflake
entry: autoflake
language: python
types: [python]
args:
[
"--in-place",
"--remove-unused-variable",
"--remove-all-unused-imports",
]
- id: flake8
name: flake8
entry: flake8
language: python
types: [python]
additional_dependencies:
- "pep8-naming"
- "flake8-docstrings"
exclude: |
(?x)(
^mdbs/.*
| migrate/versions/.*
| .*\.lock$
)
- id: isort
name: isort
entry: isort
language: python
types: [python]
additional_dependencies: ["toml"]
exclude: |
(?x)(
^mdbs/.*
| migrate/versions/.*
)
- id: pydocstyle
name: pydocstyle
entry: pydocstyle
language: python
types: [python]
exclude: |
(?x)(
^mdbs/.*
| migrate/versions/.*
| scripts/otf2ttf.py
| .*\.lock$
)
- id: pyright
name: pyright
entry: pyright
language: node
pass_filenames: false
types: [python]
additional_dependencies: ["[email protected]"]
- id: check-added-large-files
name: check-added-large-files
entry: check-added-large-files
language: python
types: [python]
args: ["--maxkb=500"]
- id: check-yaml
name: check-yaml
entry: check-yaml
language: python
types: [python]
files: \.(yml|ymal)$
- id: check-toml
name: check-toml
entry: check-toml
language: python
types: [python]
files: \.(yml|ymal)$
- id: trailing-whitespace-fixer
name: trailing-whitespace-fixer
entry: trailing-whitespace-fixer
language: node
types: [python]
exclude: |
(?x)(
^depends//.*
| ^tests/.*/fixtures/.*
| ^.vscode/.*
| .*\.md$
| .*\.lock$
)
- id: end-of-file-fixer
name: end-of-file-fixer
entry: end-of-file-fixer
language: python
types: [python]
exclude: |
(?x)(
^depends//.*
| ^tests/.*/fixtures/.*
| ^.vscode/.*
| .*\.md$
)
- id: fix-encoding-pragma
name: fix-encoding-pragma
entry: fix-encoding-pragma
language: python
types: [python]
# - id: requirements-txt-fixer
- id: debug-statement-hook
name: debug-statement-hook
entry: debug-statement-hook
language: python
types: [python]
- id: check-docstring-first
name: check-docstring-first
entry: check-docstring-first
language: python
types: [python]
# - id: name-tests-test
# name: name-tests-test
# entry: name-tests-test
# language: python
# types: [python]
# args: ["--pytest-test-first"]
- id: mixed-line-ending
name: mixed-line-ending
entry: mixed-line-ending
language: python
types: [python]
args: ["--fix=lf"]
exclude: |
(?x)(
.*\.bat$
)
# - id: double-quote-string-fixer