-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
51 lines (45 loc) · 1.39 KB
/
.pre-commit-config.yaml
File metadata and controls
51 lines (45 loc) · 1.39 KB
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
repos:
# basic pre-commit hooks
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-json
# import sorting with isort
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
args: [-m 3,-w 160, -tc]
# detecting and removing unused imports with unimport
- repo: https://github.com/hakancelik96/unimport
rev: 0.2.7
hooks:
- id: unimport
args: [-r, --include-star-import]
files: "\\.(py)$"
# enforcing the use of new python syntax with pyupgrade
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
# code formatting with black
- repo: 'https://github.com/psf/black'
rev: 20.8b1
hooks:
- id: black
args: [--line-length=160,]
language_version: python3
# linting and code analysis with flake8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
args: [--max-line-length=160, --ignore=E203 E231 E800 W503 ANN101 ANN102 ANN204 N806 N803 N802]
additional_dependencies: [flake8-bugbear, flake8-comprehensions, flake8-eradicate, pep8-naming, flake8-annotations]
# type checking with mypy
- repo: 'https://github.com/pre-commit/mirrors-mypy'
rev: v0.782
hooks:
- id: mypy