-
Notifications
You must be signed in to change notification settings - Fork 8
/
.pre-commit-config.yaml
57 lines (57 loc) · 1.83 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
# let's ignore symlinks, otherwise certain hooks complain on Windows
exclude: '^(\.activate\.sh|docs/changelog\.rst)$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
language_version: python3.8
- id: check-byte-order-marker
language_version: python3.8
- id: check-json
language_version: python3.8
- id: check-yaml
language_version: python3.8
- id: debug-statements
language_version: python3.8
- id: end-of-file-fixer
language_version: python3.8
- id: fix-encoding-pragma
language_version: python3.8
args:
- --remove
- id: name-tests-test
language_version: python3.8
- id: trailing-whitespace
language_version: python3.8
# this hook doesn't seem to honor the global exclude setting
exclude: '^(\.activate\.sh|docs/changelog\.rst)$'
- id: requirements-txt-fixer
language_version: python3.8
files: requirements-dev.txt
- repo: https://github.com/ambv/black
rev: 22.10.0
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
exclude: ^docs
language_version: python3.8
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.2
hooks:
- id: pyupgrade
language_version: python3.8
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports
language_version: python3.8
args: [
'--remove-import', 'from __future__ import absolute_import',
'--remove-import', 'from __future__ import print_function',
'--remove-import', 'from __future__ import unicode_literals',
]