forked from TheKevJames/coveralls-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
125 lines (123 loc) · 3.65 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
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.11.1
hooks:
- id: pylint
additional_dependencies:
# TODO: >0.2.0
- git+https://github.com/bayesimpact/pylint_import_modules@016f79e4d2
args:
- --allowed-direct-imports="typing.*"
- --load-plugins=pylint_import_modules
- --max-line-length=79
- --max-args=10
- --score=n
- -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.1.10
hooks:
- id: remove-tabs
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
args: [--py3-plus]
exclude: nonunicode/.*
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
hooks:
- id: pyupgrade
args: [--py3-plus]
exclude: nonunicode/.*
- repo: https://github.com/asottile/yesqa
rev: v1.2.3
hooks:
- id: yesqa
files: coveralls/.*
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5.7
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://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies:
- flake8-2020==1.6.0
- flake8-broken-line==0.3.0
- flake8-builtins==1.5.3
- flake8-commas==2.0.0
- flake8-comprehensions==3.3.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