summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/flakes.py24
-rw-r--r--tools/test-requires8
-rw-r--r--tox.ini12
3 files changed, 13 insertions, 31 deletions
diff --git a/tools/flakes.py b/tools/flakes.py
deleted file mode 100644
index 191bd6ea..00000000
--- a/tools/flakes.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""
- wrapper for pyflakes to ignore gettext based warning:
- "undefined name '_'"
-
- Synced in from openstack-common
-"""
-
-__all__ = ['main']
-
-import __builtin__ as builtins
-import sys
-
-import pyflakes.api
-from pyflakes import checker
-
-
-def main():
- checker.Checker.builtIns = (set(dir(builtins)) |
- set(['_']) |
- set(checker._MAGIC_GLOBALS))
- sys.exit(pyflakes.api.main())
-
-if __name__ == "__main__":
- main()
diff --git a/tools/test-requires b/tools/test-requires
index 52a181b8..936eb90c 100644
--- a/tools/test-requires
+++ b/tools/test-requires
@@ -1,3 +1,9 @@
+# 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
+
# Optional backend: SQL
pysqlite
@@ -14,8 +20,6 @@ nose # for test discovery and console feedback
nosexcover
openstack.nose_plugin
nosehtmloutput
-pylint # static code analysis
-pep8==1.3.3 # checks for PEP8 code style compliance
Sphinx>=1.1.2 # required to build documentation
unittest2 # backport of unittest lib in python 2.7
webtest # test wsgi apps without starting an http server
diff --git a/tox.ini b/tox.ini
index d2669cce..d9ada139 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,8 +16,8 @@ commands = nosetests {posargs}
[testenv:pep8]
commands =
- pep8 --exclude=.venv,.tox,dist,doc,openstack,vendor,*egg --repeat --show-source .
- pep8 --repeat --show-source --filename=keystone* bin
+ flake8
+ flake8 --filename=keystone* bin
[tox:jenkins]
downloadcache = ~/cache/pip
@@ -28,6 +28,8 @@ setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
commands = {posargs}
-[testenv:pyflakes]
-deps = pyflakes
-commands = python tools/flakes.py keystone
+[flake8]
+show-source = true
+ignore = H,F841,F401,F403
+builtins = _
+exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor