-
Notifications
You must be signed in to change notification settings - Fork 573
Expand file tree
/
Copy pathtox.ini
More file actions
172 lines (148 loc) · 3.74 KB
/
tox.ini
File metadata and controls
172 lines (148 loc) · 3.74 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[tox]
requires = virtualenv<20.22.0
envlist = reset,py{27,27-portable,35,36,38,39,310},stats
skip_missing_interpreters = true
[testenv]
setenv =
BITMESSAGE_HOME = {envtmpdir}
HOME = {envtmpdir}
PYTHONWARNINGS = default
deps = -rrequirements.txt
commands =
python checkdeps.py
python src/bitmessagemain.py -t
coverage run -a -m tests
[testenv:lint-basic]
skip_install = true
basepython = python3
deps =
bandit
flake8
commands =
bandit -r -s B101,B411,B413,B608 \
-x checkdeps.*,bitmessagecurses,bitmessageqt,tests pybitmessage
flake8 pybitmessage --count --select=E9,F63,F7,F82 \
--show-source --statistics
[testenv:lint]
skip_install = true
basepython = python3
deps =
-rrequirements.txt
pylint
commands = pylint --rcfile=tox.ini --exit-zero pybitmessage
[testenv:bandit]
skip_install = true
basepython = python3
deps =
bandit
commands =
bandit -r -s B101,B411,B413,B608 \
-x checkdeps.*,bitmessagecurses,bitmessageqt,tests pybitmessage
[testenv:flake8]
skip_install = true
basepython = python3
deps =
flake8
commands =
flake8 --config=tox.ini pybitmessage --count --select=E9,F63,F7,F82 \
--show-source --statistics
[testenv:pylint]
skip_install = true
basepython = python3
deps =
-rrequirements.txt
pylint
commands = pylint --rcfile=tox.ini --exit-zero pybitmessage
[testenv:pycodestyle]
skip_install = true
basepython = python3
deps =
pycodestyle
commands =
- pycodestyle --config=tox.ini pybitmessage
[testenv:bandit-py27]
skip_install = true
basepython = python2.7
deps =
bandit<1.7.0
commands =
bandit -r -s B101,B411,B413,B603,B608 \
-x checkdeps.*,bitmessagecurses,bitmessageqt,tests pybitmessage
[testenv:flake8-py27]
skip_install = true
basepython = python2.7
deps =
flake8<4.0.0
commands =
flake8 --config=tox.ini pybitmessage --count --select=E9,F63,F7,F82 \
--show-source --statistics
[testenv:pycodestyle-py27]
skip_install = true
basepython = python2.7
deps =
pycodestyle<2.6.0
commands =
pycodestyle --config=tox.ini pybitmessage
[testenv:pylint-py27]
skip_install = true
basepython = python2.7
deps =
-rrequirements.txt
pylint<2.0.0
commands = pylint --rcfile=tox.ini --exit-zero pybitmessage
[testenv:py27]
sitepackages = true
[testenv:py27-doc]
deps =
.[docs]
-r docs/requirements.txt
commands = python setup.py build_sphinx
[testenv:py27-portable]
skip_install = true
commands = python pybitmessage/bitmessagemain.py -t
[testenv:py35]
skip_install = true
[testenv:py36]
setenv =
BITMESSAGE_TEST_POW = true
{[testenv]setenv}
[testenv:reset]
skip_install = true
deps = coverage
commands = coverage erase
[testenv:stats]
skip_install = true
deps = coverage
commands =
coverage report
coverage xml
[coverage:run]
source = src
omit =
tests.py
*/tests/*
src/bitmessagekivy/*
src/version.py
src/fallback/umsgpack/*
[coverage:report]
ignore_errors = true
[pycodestyle]
max-line-length = 119
ignore = E402,E722,W503
[flake8]
max-line-length = 119
exclude = bitmessagecli.py,bitmessagecurses,bitmessageqt,plugins,tests,umsgpack
ignore = E722,F841,W503
# E722: pylint is preferred for bare-except
# F841: pylint is preferred for unused-variable
# W503: deprecated: https://bugs.python.org/issue26763 - https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
[pylint.main]
disable =
invalid-name,consider-using-f-string,fixme,raise-missing-from,
super-with-arguments,unnecessary-pass,unknown-option-value,
unspecified-encoding,useless-object-inheritance,useless-option-value
ignore = bitmessagecurses,bitmessagekivy,bitmessageqt,messagetypes,mockbm,
network,plugins,umsgpack,bitmessagecli.py
max-args = 8
max-positional-arguments = 8
max-attributes = 8