-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
184 lines (168 loc) · 5.11 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
files: ^(.*\.(py|json|md|sh|yaml|yml|in|cfg|txt|rst|toml|precommit-toml|wordlist))$
# exclude: ^(\.[^/]*cache/.*)$
ci:
autoupdate_schedule: weekly
skip: [eslint, prettier, mypy]
autofix_commit_msg: "ci: auto fixes from pre-commit.ci\n\nFor more information, see https://pre-commit.ci"
autoupdate_commit_msg: 'ci: pre-commit autoupdate [pre-commit.ci]'
autofix_prs: false
default_language_version:
python: python3.11 # NOTE: sync with .python-version-default
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
exclude: LICENSES/
- id: end-of-file-fixer
exclude: docs/.*
- id: check-merge-conflict
- id: check-case-conflict
# - id: check-illegal-windows-names
- id: check-json
exclude: (\.devcontainer/devcontainer.json|\.vscode/)
- id: check-toml
- id: check-yaml
args: [--unsafe, --allow-multiple-documents]
- id: check-ast
- id: debug-statements
- id: destroyed-symlinks
- id: check-docstring-first
- id: check-added-large-files
args: ['--maxkb=710']
- id: check-builtin-literals
- id: check-case-conflict
- id: detect-private-key
- id: mixed-line-ending
# - id: check-executables-have-shebangs
# - id: check-shebang-scripts-are-executable
- id: fix-byte-order-marker
# - id: file-contents-sorter
# files: dictionary.*\.txt$|\.wordlist$
# args: [--ignore-case]
- id: no-commit-to-branch
args:
- --branch=main
- --branch=release
- id: detect-private-key
- id: name-tests-test
- repo: https://github.com/mxr/sync-pre-commit-deps
rev: v0.0.1
hooks:
- id: sync-pre-commit-deps
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.16.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-angular']
# - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
# rev: v2.7.2
# hooks:
# - id: editorconfig-checker
# alias: ec
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
hooks:
- id: ruff
types_or: [python, jupyter]
args: ['--fix', '--show-fixes']
exclude: ^(build|examples|tests)/.*$
- id: ruff-format
types_or: [python, jupyter]
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.16.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-angular']
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args: ['--write']
types_or:
- yaml
- markdown
- html
- css
- scss
- javascript
- json
- toml
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
# exclude: ^(docs/conf.py)$
args: []
additional_dependencies: &mypy_deps
- types-PyYAML
- tomli >= 0.2.6, < 2.0.0
- click >= 8.1.0, != 8.1.4, != 8.1.5
- packaging >= 22.0
- platformdirs >= 2.1.0
- pytest
- hypothesis
- aiohttp >= 3.7.4
- types-commonmark
- types-requests>=2.31
- urllib3>=2.2.1
- hypothesmith
- id: mypy
name: mypy (Python 3.10)
files: src/
args: ['--python-version=3.10']
additional_dependencies: *mypy_deps
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
hooks:
- id: check-dependabot
# - id: check-github-actions
- id: check-github-workflows
# - id: check-gitlab-ci
- id: check-readthedocs
# - id: check-taskfile
args: ['--verbose']
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args:
- -d
- '{extends: relaxed, rules: {line-length: {max: 90}}}'
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.40.0
hooks:
- id: markdownlint
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
hooks:
- id: check-github-workflows
args: ['--verbose']
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: ['tomli>=2.0.1']
exclude: (.*\.svg|pyproject.toml|LICENSE|LICENSES/|\.github/actions)
- repo: https://github.com/rhysd/actionlint
rev: v1.6.27
hooks:
- id: actionlint
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.2
hooks:
- id: reuse
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes