-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
98 lines (88 loc) · 2.09 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
[tox]
minversion=2.3.1
envlist = {py36,py37,py38,py39,py310}-flake8{_4,_3},linters,docs
[testenv]
deps =
flake8_4: flake8>=4.0
flake8_3: flake8<4.0
flake8_2.5: flake8<2.6
flake8_2.6: flake8<2.7
pep8
pycodestyle
mock
pytest
commands =
py.test {posargs}
[testenv:venv]
deps =
.
commands = {posargs}
# Linters
[testenv:flake8]
skip_install = true
deps =
flake8
flake8-docstrings>=0.2.7
flake8-import-order
commands =
flake8 src/flake8_polyfill/ tests/ setup.py
[testenv:pylint]
skip_install = true
deps =
pyflakes
pylint
commands =
pylint src/flake8_polyfill
[testenv:bandit]
skip_install = true
deps =
bandit
commands =
bandit -r src/flake8_polyfill/ -c .bandit.yml
[testenv:linters]
skip_install = true
deps =
{[testenv:flake8]deps}
{[testenv:pylint]deps}
{[testenv:bandit]deps}
commands =
{[testenv:flake8]commands}
{[testenv:pylint]commands}
{[testenv:bandit]commands}
# Release tooling
[testenv:build]
skip_install = true
deps =
wheel
setuptools
commands =
python setup.py -q sdist bdist_wheel
[testenv:release]
skip_install = true
deps =
{[testenv:build]deps}
twine >= 1.5.0
commands =
{[testenv:build]commands}
twine upload --skip-existing dist/*
[testenv:pre-commit]
basepython = python3.9
skip_install = true
deps = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
# Flake8 Configuration
[flake8]
# Ignore some flake8-docstrings errors
# NOTE(sigmavirus24): While we're still using flake8 2.x, this ignore line
# defaults to selecting all other errors so we do not need select=E,F,W,I,D
# Once Flake8 3.0 is released and in a good state, we can use both and it will
# work well \o/
ignore = D203
# NOTE(sigmavirus24): Once we release 3.0.0 this exclude option can be specified
# across multiple lines. Presently it cannot be specified across multiple lines.
# :-(
exclude = .tox,.git,__pycache__,docs/source/conf.py,build,dist,tests/fixtures/*,*.pyc,*.egg-info,./.cache,./.eggs
max-complexity = 10
import-order-style = google
application-import-names = flake8_polyfill