Merge "Enables E711,E721,E712 pep8 rules"

This commit is contained in:
Jenkins
2013-12-11 22:46:02 +00:00
committed by Gerrit Code Review
3 changed files with 5 additions and 5 deletions

View File

@@ -2134,7 +2134,7 @@ def _get_secgroup(cs, secgroup):
if not six.PY3:
s.name = s.name.encode(encoding)
if secgroup == s.name:
if match_found != False:
if match_found is not False:
msg = ("Multiple security group matches found for name"
" '%s', use an ID to be more specific." % secgroup)
raise exceptions.NoUniqueMatch(msg)
@@ -2891,7 +2891,7 @@ def do_coverage_stop(cs, args):
help='Generate XML reports instead of text ones.')
def do_coverage_report(cs, args):
"""Generate coverage report."""
if args.html == True and args.xml == True:
if args.html is True and args.xml is True:
raise exceptions.CommandError("--html and --xml must not be "
"specified together.")
cov = cs.coverage.report(args.filename, xml=args.xml, html=args.html)

View File

@@ -1957,7 +1957,7 @@ def _get_secgroup(cs, secgroup):
'UTF-8')
s.name = s.name.encode(encoding)
if secgroup == s.name:
if match_found != False:
if match_found is not False:
msg = ("Multiple security group matches found for name"
" '%s', use an ID to be more specific." % secgroup)
raise exceptions.NoUniqueMatch(msg)
@@ -2714,7 +2714,7 @@ def do_coverage_stop(cs, args):
help='Generate XML reports instead of text ones.')
def do_coverage_report(cs, args):
"""Generate coverage report."""
if args.html == True and args.xml == True:
if args.html is True and args.xml is True:
raise exceptions.CommandError("--html and --xml must not be "
"specified together.")
cov = cs.coverage.report(args.filename, xml=args.xml, html=args.html)

View File

@@ -28,6 +28,6 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
downloadcache = ~/cache/pip
[flake8]
ignore = E12,E711,E721,E712,F841,F811,F821,H302,H306,H403,H404
ignore = E12,F841,F811,F821,H302,H306,H403,H404
show-source = True
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build