-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
136 lines (136 loc) · 4.44 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
repos:
- repo: local
hooks:
- id: check-ast
name: check python ast
description: simply checks whether the files parse as valid python.
entry: check-ast
language: system
types: [python]
- id: check-case-conflict
name: check for case conflicts
description: checks for files that would conflict in case-insensitive filesystems.
entry: check-case-conflict
language: system
- id: check-docstring-first
name: check docstring is first
description: checks a common error of defining a docstring after code.
entry: check-docstring-first
language: system
types: [python]
- id: check-symlinks
name: check for broken symlinks
description: checks for symlinks which do not point to anything.
entry: check-symlinks
language: system
types: [symlink]
- id: check-toml
name: check toml
description: checks toml files for parseable syntax.
entry: check-toml
language: system
types: [toml]
- id: check-yaml
name: check yaml
description: checks yaml files for parseable syntax.
entry: check-yaml
language: system
types: [yaml]
- id: debug-statements
name: debug statements (python)
description: checks for debugger imports and py37+ `breakpoint()` calls in python source.
entry: debug-statement-hook
language: system
types: [python]
- id: end-of-file-fixer
name: fix end of files
description: ensures that a file is either empty, or ends with one newline.
entry: end-of-file-fixer
language: system
types: [text]
exclude: tests/data/
- id: trailing-whitespace
name: trim trailing whitespace
description: trims trailing whitespace.
entry: trailing-whitespace-fixer
language: system
types: [text]
exclude: tests/data/
- repo: local
hooks:
- id: forbidden-files-copier-rej
name: find copier rejection files
language: fail
entry: "Found copier update rejection file(s): review and remove them"
files: "\\.rej$"
- id: forbidden-files-git-orig
name: find git merge backup files
language: fail
entry: "Found git merge backup file(s): review and remove them"
files: "\\.orig$"
- repo: local
hooks:
- id: rstcheck
name: rstcheck
description: Check REST files for correctness
language: system
entry: rstcheck
types: [rst]
- repo: local
hooks:
- id: codespell
name: codespell
description: Check for spelling errors
language: system
entry: codespell
exclude: tests/data/
args: ['-L astroid,fof']
- repo: local
hooks:
- id: black
name: black
description: Format Python code
language: system
entry: black
types_or: [python, pyi]
- repo: local
hooks:
- id: isort
name: isort
description: Group and sort Python imports
language: system
entry: isort
types_or: [python, pyi, cython]
args: ['--filter-files']
- repo: local
hooks:
- id: pydocstyle
name: pydocstyle
description: Check docstrings in Python code for compliance with conventions
language: system
entry: pydocstyle
types: [python]
files: ^src/
- repo: local
hooks:
- id: pylint
name: pylint
description: Check Python code for correctness, consistency and adherence to best practices
language: system
entry: pylint
types: [python]
args:
- "--max-line-length=88"
- "--disable=C0116,R0912,R0913,R0914,R0915,R1710,W0511,W0719"
- repo: local
hooks:
- id: flake8
name: flake8
description: Check Python code for correctness, consistency and adherence to best practices
language: system
entry: flake8
types: [python]
args:
- "--max-line-length=88"
- "--ignore=E203,W503,F811,I002"
- "--max-complexity=12"