[tox] envlist = test,lint,flake8,black skipsdist = True [testenv] basepython = python3 deps = -r {toxinidir}/requirements.txt setenv = script = backport_pr.py commands = test: {[testenv:test]commands} lint: {[testenv:lint]commands} flake8: {[testenv:flake8]commands} black: {[testenv:black]commands} [testenv:test] deps = pytest {[testenv]deps} commands = pytest -v --doctest-modules {env:script} [testenv:lint] deps = pylint {[testenv]deps} commands = # Suppress warning about TODO in code pylint --rcfile=setup.cfg --disable=fixme {env:script} [testenv:flake8] deps = flake8 commands = # main() is quite complex, provide enough margin flake8 --max-complexity=25 {env:script} [testenv:black] deps = black commands = black --check --diff {env:script}