Skip to content

Support for tox #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 14, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
tox env to easily run flake8
Most people know about pep8 which enforce coding style.  pyflakes goes a
step beyond by analyzing the code.

flake8 is basically a wrapper around both pep8 and pyflakes and comes
with some additional checks.  I find it very useful since you only need
to require one package to have a lot of code issues reported to you.

This patch provides a 'flake8' tox environement to easily install and
run the utility on the code base.  One simply has to:

 tox -eflake8

The env has been added to the default list of environement to have
flake8 run by default.

The repository in its current state does not pass checks but I noticed a
pull request fixing pep8 issues.  We can later easily ensure there is no
regression by adjusting Travis configuration to run this env.

More informations about flake8: https://pypi.python.org/pypi/flake8
  • Loading branch information
hashar committed Jul 25, 2014
commit d43055d44e58e8f010a71ec974c6a26f091a0b7a
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Remember to update README.md
coverage
flake8
nose
mock
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py26,py27
envlist = py26,py27,flake8

[testenv]
commands = nosetests
Expand All @@ -9,5 +9,12 @@ deps = -r{toxinidir}/requirements.txt
[testenv:cover]
commands = nosetests --with-coverage

[testenv:flake8]
commands = flake8

[testenv:venv]
commands = {posargs}

[flake8]
#show-source = True
exclude = .tox,.venv,build,dist,doc,git/ext/