-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
86 lines (79 loc) · 2.36 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
# Run these hooks before each commit to ensure code style integrity
# https://pre-commit.com/
default_language_version:
python: python3.6
repos:
- repo: https://github.com/timothycrosley/isort
rev: 5.8.0
hooks:
- id: isort
exclude: "__init__.py"
args:
- "--line-length=120"
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
args:
- "--line-length=120"
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
hooks:
- id: flake8
exclude: "__init__.py"
args:
- "--max-line-length=120"
- "--extend-ignore=E203,F403,F405,PT011,U101"
- "--pytest-parametrize-names-type=csv"
- "--pytest-fixture-no-parentheses"
- "--pytest-parametrize-values-type=tuple"
- "--unused-arguments-ignore-abstract-functions"
- "--unused-arguments-ignore-stub-functions"
- "--unused-arguments-ignore-variadic-names"
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
- flake8-logging-format
- flake8-printf-formatting
- flake8-pytest-style
- flake8-unused-arguments
- flake8-use-fstring
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
hooks:
- id: flake8
name: flake8-docstrings
exclude: "(tests|setup.py|__init__.py)"
args:
- "--max-line-length=120"
- "--select=D"
- "--ignore=D100"
additional_dependencies:
- flake8-docstrings
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
hooks:
- id: mypy
exclude: "tests"
args:
- "--allow-redefinition"
- "--disallow-incomplete-defs"
- "--disallow-untyped-calls"
- "--ignore-missing-imports"
- "--warn-redundant-casts"
- "--warn-unused-ignores"
- "--warn-unreachable"
- "--strict-equality"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-yaml
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace