Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d43055d

Browse files
committed
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
1 parent 2ddd5e5 commit d43055d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Remember to update README.md
22
coverage
3+
flake8
34
nose
45
mock

tox.ini

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py26,py27
2+
envlist = py26,py27,flake8
33

44
[testenv]
55
commands = nosetests
@@ -9,5 +9,12 @@ deps = -r{toxinidir}/requirements.txt
99
[testenv:cover]
1010
commands = nosetests --with-coverage
1111

12+
[testenv:flake8]
13+
commands = flake8
14+
1215
[testenv:venv]
1316
commands = {posargs}
17+
18+
[flake8]
19+
#show-source = True
20+
exclude = .tox,.venv,build,dist,doc,git/ext/

0 commit comments

Comments
 (0)