From: Jeremy Stanley Date: Thu, 15 Dec 2016 11:25:38 +0000 (+0000) Subject: Support running flake8 under tox X-Git-Tag: 0.0.1~171 X-Git-Url: https://mudpy.org/gitweb?a=commitdiff_plain;h=fc795709ca8bf595b74acc3720d92cba0306b1aa;p=mudpy.git Support running flake8 under tox Add the necessary configuration to be able to run `tox` for performing style checks easily with flake8. --- diff --git a/.gitignore b/.gitignore index fbfa177..e3fe8a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +*.egg-info/ +.eggs/ +.tox/ capture_*.log data/ mudpy/__pycache__/ diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..3930480 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +flake8 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..041861a --- /dev/null +++ b/tox.ini @@ -0,0 +1,21 @@ +[tox] +minversion = 2.0 +envlist = flake8 +skipsdist = True + +[testenv] +usedevelop = True +install_command = pip install {opts} {packages} +setenv = + VIRTUAL_ENV={envdir} + PYTHONWARNINGS=default::DeprecationWarning +deps = -r{toxinidir}/test-requirements.txt +commands = python setup.py test --slowest --testr-args='{posargs}' + +[testenv:flake8] +basepython=python3 +commands = flake8 {posargs} + +[flake8] +show-source = True +exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build