From fc795709ca8bf595b74acc3720d92cba0306b1aa Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 15 Dec 2016 11:25:38 +0000 Subject: [PATCH] Support running flake8 under tox Add the necessary configuration to be able to run `tox` for performing style checks easily with flake8. --- .gitignore | 3 +++ test-requirements.txt | 1 + tox.ini | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 test-requirements.txt create mode 100644 tox.ini 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 -- 2.11.0