-
Notifications
You must be signed in to change notification settings - Fork 18
/
.pre-commit-config.yaml
152 lines (135 loc) · 3.92 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
ci:
skip: [interrogate]
repos:
# Formatters
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
- id: fix-encoding-pragma
args: [--remove]
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
types: [file]
types_or: [python, pyi]
args: [--py38-plus]
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.0
hooks:
- id: absolufy-imports
exclude: ^benchmark
types: [file]
types_or: [python, pyi]
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
types: [file]
types_or: [python, pyi]
language_version: python3
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
types: [file]
types_or: [python, pyi]
minimum_pre_commit_version: 2.9.0
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.0
hooks:
- id: setup-cfg-fmt
# Notebook tools
- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
hooks:
- id: nbstripout
args: [--strip-empty-cells]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.2.3
hooks:
- id: nbqa-black
additional_dependencies: [black==21.6b0]
args: [--nbqa-mutate]
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==2.19.4]
args: [--nbqa-mutate, --py38-plus]
- id: nbqa-flake8
- id: nbqa-check-ast
- id: nbqa-isort
additional_dependencies: [isort==5.9.1]
args: [--nbqa-mutate]
# Linters
- repo: https://github.com/asottile/yesqa
rev: v1.3.0
hooks:
- id: yesqa
types: [file]
types_or: [python, pyi]
additional_dependencies: [flake8-docstrings, flake8-print]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
name: "flake8 lint code"
types: [file]
types_or: [python, pyi]
additional_dependencies:
[flake8-pyi, flake8-comprehensions, flake8-print]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
alias: flake8-docs
args:
- "--select=D,DAR"
name: "flake8 lint docstrings"
files: "^glotaran/(plugin_system|utils|deprecation|testing|parameter|project|model/property.py)"
exclude: "docs|tests?/"
additional_dependencies: [flake8-docstrings, darglint==1.8.0]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
files: "^glotaran/(plugin_system|utils|deprecation|testing|parameter|project|model/property.py)"
exclude: "docs"
additional_dependencies: [types-all]
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
args: [-vv, --config=pyproject.toml, glotaran]
pass_filenames: false
- repo: https://github.com/myint/rstcheck
rev: "3f92957478422df87bd730abde66f089cc1ee19b"
hooks:
- id: rstcheck
additional_dependencies: [sphinx]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: rst-backticks
- id: python-check-blanket-noqa
exclude: "docs|tests?"
- id: python-check-blanket-type-ignore
exclude: "docs|tests?"
- id: python-use-type-annotations
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
types: [file]
types_or: [python, pyi, markdown, rst, jupyter]
args: [-L doas]
- repo: https://github.com/mgedmin/check-manifest
rev: "0.47"
hooks:
- id: check-manifest