diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..5d0b0823f1 --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +ignore = E127,E226,E301,E302,E303,E309,E402,E701,E711,E712,E731 +max_line_length = 120 +show_source = True diff --git a/Makefile b/Makefile index 80679afe29..6065593f19 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,6 @@ pip := pip --disable-pip-version-check with_local_env := $(env_bin)/honcho run -e defaults.env,local.env with_tests_env := $(env_bin)/honcho run -e $(test_env_files) py_test := $(with_tests_env) $(env_bin)/py.test -pep8_ignore = E127,E226,E301,E302,E303,E309,E402,E701,E711,E712,E731 echo: @echo $($(var)) @@ -55,7 +54,7 @@ test-schema: env $(with_tests_env) ./recreate-schema.sh test pyflakes: env - $(env_bin)/flake8 --max-line-length=120 --show-source --ignore=$(pep8_ignore) app.py liberapay tests + $(env_bin)/flake8 app.py liberapay tests test: test-schema pytest tests: test diff --git a/tox.ini b/tox.ini index 9856d641bd..8c4a6797ea 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ skipsdist = True [testenv] commands = honcho run -e defaults.env,tests/test.env,tests/local.env python -m pytest tests/py {posargs} + flake8 app.py liberapay tests deps = --requirement=requirements.txt --requirement=requirements_dev.txt