-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
179 lines (172 loc) · 5.08 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: [ '--maxkb=1000' ]
- id: check-case-conflict
exclude: '{{ cookiecutter.repo_name }}'
- id: check-merge-conflict
exclude: '{{ cookiecutter.repo_name }}'
- id: check-symlinks
exclude: '{{ cookiecutter.repo_name }}'
- id: check-yaml
exclude: '{{ cookiecutter.repo_name }}'
- id: debug-statements
exclude: '{{ cookiecutter.repo_name }}'
- id: end-of-file-fixer
exclude: '{{ cookiecutter.repo_name }}'
- id: requirements-txt-fixer
exclude: '{{ cookiecutter.repo_name }}'
- id: trailing-whitespace
exclude: '{{ cookiecutter.repo_name }}'
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
hooks:
- id: pyupgrade
args: ["--py38-plus"]
name: Upgrade code
exclude: '{{ cookiecutter.repo_name }}'
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [tomli]
#args: ["--write-changes"] # uncomment if you want to get automatic fixing
exclude: '{{ cookiecutter.repo_name }}'
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: ["--in-place"]
exclude: '{{ cookiecutter.repo_name }}'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
hooks:
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [ "--fix", "--preview" ]
exclude: '{{ cookiecutter.repo_name }}'
- id: ruff-format
types_or: [ python, pyi, jupyter ]
args: [ "--preview" ]
exclude: '{{ cookiecutter.repo_name }}'
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
- mdformat-admon
- mdformat-footnote
- mdformat_frontmatter
- mdformat-mkdocs
- mdformat-toc
# Ignore readme as well, for flexibility
exclude: '^({{ cookiecutter.repo_name }}/|README.md$)'
args: [ "--number" ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
hooks:
- id: mypy
# Use pyproject.toml if possible instead of adding command line parameters here
args: []
additional_dependencies:
# Type stubs
- pytest
# Use individual packages since types-all has been deprecated
- types-DateTimeRange
- types-Deprecated
- types-Flask
- types-JACK-Client
- types-Jinja2
- types-Markdown
- types-MarkupSafe
- types-Pillow
- types-PyJWT
- types-PyMySQL
- types-PyYAML
- types-Routes
- types-Werkzeug
- types-aiofiles
- types-annoy
- types-atomicwrites
- types-backports
- types-backports-abc
- types-bleach
- types-boto
- types-cachetools
- types-certifi
- types-characteristic
- types-chardet
- types-click
- types-click-spinner
- types-colorama
- types-contextvars
- types-croniter
- types-cryptography
- types-dataclasses
- types-dateparser
- types-decorator
- types-docopt
- types-docutils
- types-emoji
- types-enum34
- types-fb303
- types-filelock
- types-first
- types-freezegun
- types-frozendict
- types-futures
- types-geoip2
- types-ipaddress
- types-itsdangerous
- types-kazoo
- types-maxminddb
- types-mock
- types-mypy-extensions
- types-nmap
- types-openssl-python
- types-orjson
- types-paramiko
- types-pathlib2
- types-polib
- types-protobuf
- types-pyRFC3339
- types-pyaudio
- types-pycurl
- types-pyfarmhash
- types-pymssql
- types-pysftp
- types-python-dateutil
- types-python-gflags
- types-python-slugify
- types-pytz
- types-pyvmomi
- types-redis
- types-requests
- types-retry
- types-scribe
- types-setuptools
- types-simplejson
- types-singledispatch
- types-six
- types-tabulate
- types-termcolor
- types-toml
- types-tornado
- types-typed-ast
- types-tzlocal
- types-ujson
- types-waitress
- types-xxhash
- types-tqdm
exclude: '{{ cookiecutter.repo_name }}'
- repo: local
hooks:
- id: pytest-check
name: pytest-check
entry: pytest -v tests
language: system
pass_filenames: false
always_run: true