Explorar o código

add flake8 style checking

Thomas Waldmann %!s(int64=9) %!d(string=hai) anos
pai
achega
2a2362fc2f
Modificáronse 2 ficheiros con 14 adicións e 3 borrados
  1. 8 2
      setup.cfg
  2. 6 1
      tox.ini

+ 8 - 2
setup.cfg

@@ -2,5 +2,11 @@
 python_files = testsuite/*.py
 
 [flake8]
-max-line-length = 120
-exclude = build,dist,.git,.idea,.cache,.tox
+# please note that the values are adjusted so that they do not cause failures
+# with existing code. if you want to change them, you should first fix all
+# flake8 failures that appear with your change.
+ignore = E122,E123,E125,E126,E127,E128,E226,E402,F401,F811
+# line length long term target: 120
+max-line-length = 255
+exclude = build,dist,.git,.idea,.cache,.tox,docs/conf.py
+

+ 6 - 1
tox.ini

@@ -2,7 +2,7 @@
 # fakeroot -u tox --recreate
 
 [tox]
-envlist = py{34,35}
+envlist = py{34,35},flake8
 
 [testenv]
 # Change dir to avoid import problem for cython code. The directory does
@@ -14,3 +14,8 @@ deps =
 commands = py.test --cov=borg --cov-config=../.coveragerc --benchmark-skip --pyargs {posargs:borg.testsuite}
 # fakeroot -u needs some env vars:
 passenv = *
+
+[testenv:flake8]
+changedir =
+deps = flake8
+commands = flake8