diff --git a/run_tests.sh b/run_tests.sh index a42d0d3d6..a7d66dd12 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -102,13 +102,8 @@ function copy_subunit_log { } function run_pep8 { - echo "Running pep8 ..." - srcfiles="--exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*" - srcfiles+=",*egg,build ." - # Just run PEP8 in current environment - # - ignore="--ignore=E12,E711,E721,E712" - ${wrapper} pep8 ${ignore} --show-source ${srcfiles} + echo "Running flake8 ..." + ${wrapper} flake8 } TESTRTESTS="testr run --parallel $testropts" diff --git a/tools/test-requires b/tools/test-requires index 203b0e264..8da41c8fd 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -1,11 +1,16 @@ distribute>=0.6.24 +# Install bounded pep8/pyflakes first, then let flake8 install +pep8==1.4.5 +pyflakes==0.7.2 +flake8==2.0 +hacking>=0.5.3,<0.6 + coverage discover fixtures>=0.3.12 keyring mock -pep8==1.3.3 sphinx>=1.1.2 testrepository>=0.0.13 testtools>=0.9.26 diff --git a/tox.ini b/tox.ini index 464e7859c..3318c0899 100644 --- a/tox.ini +++ b/tox.ini @@ -12,10 +12,7 @@ deps = -r{toxinidir}/tools/pip-requires commands = python setup.py testr --testr-args='{posargs}' [testenv:pep8] -deps = pep8==1.3.3 -commands = - pep8 --ignore=E12,E711,E721,E712 --show-source \ - --exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build . +commands = flake8 [testenv:venv] commands = {posargs} @@ -25,3 +22,8 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' [tox:jenkins] downloadcache = ~/cache/pip + +[flake8] +ignore = E12,E711,E721,E712,F,H +show-source = True +exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build