Move to flake8.

The project is standardizing on flake8 for static code analysis.

Change-Id: I4fd97b56b6c6cb57e8d245281e0da15f838ec840
This commit is contained in:
Monty Taylor 2013-04-20 23:22:39 -07:00
parent 9cdee05678
commit 7643f52fb2
5 changed files with 12 additions and 29 deletions

4
.pep8
View File

@ -1,4 +0,0 @@
[pep8]
ignore = E121,E126,E127,E128,W602
exclude = vcsversion.py,panel_template,dash_template,local_settings.py

View File

@ -79,7 +79,7 @@ def write_autodoc_index():
if not(os.path.exists(MOD_DIR)):
os.mkdir(MOD_DIR)
for module in find_autodoc_modules(modulename, path):
if any([module.startswith(exclude) for exclude \
if any([module.startswith(exclude) for exclude
in EXCLUDED_MODULES]):
print "Excluded module %s." % module
continue

View File

@ -136,8 +136,8 @@ function run_pylint {
}
function run_pep8 {
echo "Running pep8 ..."
${command_wrapper} pep8 $included_dirs
echo "Running flake8 ..."
${command_wrapper} flake8 $included_dirs
}
function run_sphinx {

View File

@ -1,5 +1,11 @@
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
# Testing Requirements
coverage
django-nose
@ -9,8 +15,6 @@ nose-exclude
nosexcover
openstack.nose_plugin
nosehtmloutput
pep8>=1.3
pylint
selenium
# Docs Requirements

23
tox.ini
View File

@ -13,7 +13,6 @@ deps = -r{toxinidir}/tools/pip-requires
commands = /bin/bash run_tests.sh -N
[testenv:pep8]
deps = pep8
commands = /bin/bash run_tests.sh -N --pep8
[testenv:venv]
@ -25,22 +24,6 @@ commands = /bin/bash run_tests.sh -N --coverage
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:jenkins26]
setenv = NOSE_WITH_XUNIT=1
basepython = python2.6
[testenv:jenkins27]
setenv = NOSE_WITH_XUNIT=1
basepython = python2.7
[testenv:jenkinspep8]
setenv = NOSE_WITH_XUNIT=1
commands = /bin/bash run_tests.sh -N --pep8
[testenv:jenkinscover]
setenv = NOSE_WITH_XUNIT=1
commands = /bin/bash run_tests.sh -N --coverage
[testenv:jenkinsvenv]
setenv = NOSE_WITH_XUNIT=1
commands = {posargs}
[flake8]
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py
ignore = E121,E126,E127,E128,W602,F,H