-
-
Notifications
You must be signed in to change notification settings - Fork 188
/
Copy path.pre-commit-config.yaml
129 lines (126 loc) · 3.77 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
ci:
autofix_commit_msg: 'refactor(lint): apply automatic lint fixes'
autoupdate_commit_msg: 'chore(deps): bump pre-commit linter versions'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
- id: detect-private-key
- id: end-of-file-fixer
exclude: example/.*
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
# python
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: debug-statements
- id: double-quote-string-fixer
exclude: nonunicode/.*
- id: name-tests-test
exclude: tests/data/.*
- id: requirements-txt-fixer
- repo: https://github.com/pycqa/pylint
rev: v2.15.6
hooks:
- id: pylint
additional_dependencies:
- pylint-import-modules==0.3.0
args:
- --allowed-direct-imports="typing.*"
- --load-plugins=pylint_import_modules
- --max-line-length=79
- --max-args=10
- --score=n
- -d bad-file-encoding
- -d broad-except
- -d duplicate-code
- -d fixme
- -d import-error
- -d import-only-modules
- -d invalid-name
- -d locally-disabled
- -d missing-docstring
- -d too-few-public-methods
- -d ungrouped-imports # conflicts with reorder-python-imports
- -d wrong-import-order # conflicts with reorder-python-imports
- -d consider-using-f-string # not py35 compatible
- -d unspecified-encoding # TODO: reevaluate
- -d disallowed-name # TODO: fix
exclude: example/.*
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
hooks:
- id: remove-tabs
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports
args: [--py3-plus]
exclude: nonunicode/.*
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.3
hooks:
- id: pyupgrade
args: [--py3-plus]
exclude: nonunicode/.*
- repo: https://github.com/asottile/yesqa
rev: v1.4.0
hooks:
- id: yesqa
files: coveralls/.*
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.0
hooks:
- id: autopep8
files: coveralls/.*
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
args:
- --ignore=D1,D203,D205,D212,D400,D401,D404,D407,D412,D413
files: coveralls/.*
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies:
- flake8-2020==1.7.0
- flake8-broken-line==0.5.0
- flake8-builtins==1.5.3
- flake8-commas==2.1.0
- flake8-comprehensions==3.10.0
args:
- --ignore=E501,W503,F401,F811
files: coveralls/.*
- repo: local
hooks:
- id: pytest-fixture-require-scope
name: Require explicit scope for pytest fixtures
description: 'Ensure we explicitly set pytest fixture scopes'
entry: '@pytest\.fixture( |\n|(\(\)))'
language: pygrep
types: [python]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
# rst
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal