Add E123,E125 check and Solve several problems

When We do not ignore E123 and E125,there are several problems.
They are more accordant with OpenStack Style Guidelines。

Change-Id: I714a5f0e5eb4690008255ade1746a3fbe61bdea8
This commit is contained in:
gengchc2 2016-09-28 10:30:29 +08:00
parent 6231f60073
commit cd7584f6cc
3 changed files with 3 additions and 4 deletions

View File

@ -203,7 +203,7 @@ class KBRunner(object):
if not self.agent_version:
self.agent_version = "0"
if (LooseVersion(self.agent_version) != LooseVersion(self.expected_agent_version))\
and (self.expected_agent_version not in vm_version_mismatches):
and (self.expected_agent_version not in vm_version_mismatches):
# only warn once for each unexpected VM version
vm_version_mismatches.add(self.expected_agent_version)
LOG.warning("The VM image you are running (%s) is not the expected version (%s) "

View File

@ -149,7 +149,7 @@ class User(object):
if flavor['vcpus'] == fcand['vcpus'] and flavor['ram'] < fcand['ram']:
fcand = flavor
if flavor['vcpus'] == fcand['vcpus'] and flavor['ram'] == fcand['ram'] and\
flavor['disk'] < fcand['disk']:
flavor['disk'] < fcand['disk']:
fcand = flavor
find_flag = True

View File

@ -30,13 +30,12 @@ commands = oslo_debug_helper {posargs}
[flake8]
max-line-length = 100
show-source = True
# E123, E125 skipped as they are invalid PEP-8.
# H233: Python 3.x incompatible use of print operator
# H236: Python 3.x incompatible __metaclass__, use six.add_metaclass()
# E302: expected 2 blank linee
# E303: too many blank lines (2)
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
ignore = E123,E125,H233,H236,E302,E303,H404,H405
ignore = H233,H236,E302,E303,H404,H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build