Add flake8 tests in tox configuration
Use python3 version of flake8 and ignore still known issues. Don't ignore
errors in global flake8 configuration so the errors are not hidden in IDEs.
This prevent future regressions on fixed issues.
--- a/tox.ini Wed Feb 13 17:27:26 2019 +0100
+++ b/tox.ini Wed Feb 13 17:30:46 2019 +0100
@@ -1,5 +1,5 @@
[tox]
-envlist=py27,py3
+envlist=py27,py3,flake8
[testenv]
deps =
@@ -7,6 +7,12 @@
py27: unittest2 >= 0.7
commands = {envpython} -m pytest {posargs:test}
+[testenv:flake8]
+basepython = python3
+deps =
+ flake8
+commands = flake8 {posargs:--ignore=E127,E203,E261,E265,E402,E501,E731,E741,F401,F401,F403,F405,F811,F821,F841,E123,E226,W503,E241,W504,E126,E121}
+
[pytest]
python_files = *test_*.py