From 0493523854accbec303b37e7729a23fc730d5f7b Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 10 May 2013 18:19:59 -0400 Subject: [PATCH] Migrate to flake8. Fixes bug 1172444. Change-Id: Icd51f5d925d84dcec7df7c83ca43cd87bc1b090f --- tests/test_service_catalog.py | 8 ++++---- tools/generate_authors.sh | 3 --- tools/test-requires | 7 ++++++- tox.ini | 8 +++++++- 4 files changed, 17 insertions(+), 9 deletions(-) delete mode 100755 tools/generate_authors.sh diff --git a/tests/test_service_catalog.py b/tests/test_service_catalog.py index 0f5620a47..09ac19c01 100644 --- a/tests/test_service_catalog.py +++ b/tests/test_service_catalog.py @@ -69,10 +69,10 @@ "versionInfo": "https://compute.north.host/v1.1/", "versionList": "https://compute.north.host/"} ], - "endpoints_links":[{ - "rel":"next", - "href":"https://identity.north.host/v2.0/" - "endpoints?marker=2" + "endpoints_links": [{ + "rel": "next", + "href": "https://identity.north.host/v2.0/" + "endpoints?marker=2" }] }, { diff --git a/tools/generate_authors.sh b/tools/generate_authors.sh deleted file mode 100755 index c41f07988..000000000 --- a/tools/generate_authors.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -git shortlog -se | cut -c8- diff --git a/tools/test-requires b/tools/test-requires index 41348f1b3..a9c030325 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 fixtures keyring mock mox -pep8==1.3.3 pycrypto sphinx>=1.1.2 testrepository>=0.0.13 diff --git a/tox.ini b/tox.ini index 689a53c45..9620cdf68 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,8 @@ deps = -r{toxinidir}/tools/pip-requires commands = python setup.py testr --testr-args='{posargs}' [testenv:pep8] -commands = pep8 --repeat --show-source --ignore=E711,E712,E125,E126 --exclude=.venv,.tox,dist,doc,*egg . +commands = + flake8 [testenv:venv] commands = {posargs} @@ -24,3 +25,8 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' [tox:jenkins] downloadcache = ~/cache/pip + +[flake8] +ignore = E711,E712,E125,E126,F,H +show-source = True +exclude = .venv,.tox,dist,doc,*egg