Merge "Switch to flake8 from pep8."

This commit is contained in:
Jenkins 2013-04-05 01:44:53 +00:00 committed by Gerrit Code Review
commit 21e602694d
2 changed files with 12 additions and 7 deletions

View File

@ -4,13 +4,13 @@ coverage>=3.6
discover discover
distribute>=0.6.24 distribute>=0.6.24
fixtures>=0.3.12 fixtures>=0.3.12
flake8
mock>=1.0b1 mock>=1.0b1
mox==0.5.3 mox==0.5.3
nose nose
nosehtmloutput nosehtmloutput
nosexcover nosexcover
openstack.nose_plugin openstack.nose_plugin
pep8==1.3.3
python-subunit python-subunit
sphinx>=1.1.2 sphinx>=1.1.2
testrepository>=0.0.13 testrepository>=0.0.13

17
tox.ini
View File

@ -21,13 +21,8 @@ sitepackages = True
downloadcache = ~/cache/pip downloadcache = ~/cache/pip
[testenv:pep8] [testenv:pep8]
# E711/E712 comparison to False should be 'if cond is False:' or 'if not cond:'
# query = query.filter(Component.disabled == False)
# E125 continuation line does not distinguish itself from next logical line
commands = commands =
pep8 --repeat --show-source --ignore=E125,E711,E712 --exclude=.venv,.tox,dist,doc,openstack,*egg . flake8
pep8 --repeat --show-source --ignore=E125 --filename=quantum* bin
[testenv:i18n] [testenv:i18n]
commands = python ./tools/check_i18n.py ./quantum ./tools/i18n_cfg.py commands = python ./tools/check_i18n.py ./quantum ./tools/i18n_cfg.py
@ -38,3 +33,13 @@ setenv = VIRTUAL_ENV={envdir}
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[flake8]
# E711/E712 comparison to False should be 'if cond is False:' or 'if not cond:'
# query = query.filter(Component.disabled == False)
# E125 continuation line does not distinguish itself from next logical line
# H hacking.py - automatic checks of rules in HACKING.rst
ignore = E711,E712,E125,H
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools