-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
128 lines (106 loc) · 2.56 KB
/
tox.ini
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
[tox]
isolated_build = true
envlist = isort, black, flake8, pylint, py27, py36, py37, py38
[default]
setenv =
PACKAGE=webpub_manifest_parser
allowlist_externals =
python
make
[testenv]
description = Run tests
skip_install = True
setenv =
{[default]setenv}
allowlist_externals = {[default]allowlist_externals}
commands =
python --version
make init
make install
poetry run nosetests -v --with-timer
[testenv:isort]
description = Run isort
basepython = python3.6
skip_install = True
deps =
isort
setenv =
ISORT_ARGS=--check-only
commands =
isort {env:ISORT_ARGS:} --profile black src tests
[testenv:isort-reformat]
description = {[testenv:isort]description} and reformat
basepython = {[testenv:isort]basepython}
skip_install = {[testenv:isort]skip_install}
deps = {[testenv:isort]deps}
commands = {[testenv:isort]commands}
[testenv:black]
description = Run Black (linter)
basepython = python3.6
skip_install = True
deps =
black==20.8b1
setenv =
BLACK_LINT_ARGS=--check
commands =
black {env:BLACK_LINT_ARGS:} src
[testenv:black-reformat]
description = {[testenv:black]description} and reformat
basepython = {[testenv:black]basepython}
skip_install = {[testenv:black]skip_install}
deps = {[testenv:black]deps}
commands = {[testenv:black]commands} tests
[testenv:flake8]
description = Run Flake8 (linter)
basepython = python3.6
skip_install = True
deps =
flake8-bugbear==20.1.4
flake8-docstrings==1.5.0
flake8-import-order==0.18.1
flake8-mutable==1.2.0
flake8-pep3101==1.3.0
flake8==3.8.3
mccabe==0.6.1
pep8-naming==0.11.1
pycodestyle==2.6.0
pydocstyle==5.1.1
commands =
flake8 src
[flake8]
max-line-length = 120
# Codes: http://flake8.pycqa.org/en/latest/user/error-codes.html
ignore =
######## WARNINGS BELOW SHOULD BE FIXED ########
# Missing docstring in public module
D100,
# Missing docstring in public package
D104,
# Line break before binary operator
W503
[testenv:pylint]
description = Run pylint (linter)
basepython = python3.6
skip_install = True
deps =
pylint
allowlist_externals = {[default]allowlist_externals}
commands =
make init
make install
pylint --rcfile=tox.ini src/{env:PACKAGE}
[pylint]
max-line-length = 120
[MESSAGES CONTROL]
disable =
fixme,
missing-docstring,
no-self-use,
too-few-public-methods,
useless-object-inheritance,
super-with-arguments,
too-many-instance-attributes,
logging-format-interpolation,
too-many-ancestors,
duplicate-code,
raise-missing-from