Fix ignored E121 to E125 pep 8 rules
Fix pep8 violations for E121, E122, E123, E124, E125 and remove the ignored rules from tox.ini. E125 no longer should be ignored as the rule has been updated and shows valid styling validation. Other style suggestions for writing long if statements can be found here https://stackoverflow.com/questions/181530 if this rule violation causes any issue. Closes-Bug: 1462955 Change-Id: Ic9a31a9dff15da634a97dfe9cdff6d367ecc17e9
This commit is contained in:
parent
bac3a7c470
commit
803caa547b
|
@ -119,8 +119,7 @@ class BayModel(base.APIBase):
|
|||
'baymodels', baymodel.uuid),
|
||||
link.Link.make_link('bookmark', url,
|
||||
'baymodels', baymodel.uuid,
|
||||
bookmark=True)
|
||||
]
|
||||
bookmark=True)]
|
||||
return baymodel
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -75,8 +75,7 @@ class Node(base.APIBase):
|
|||
'nodes', node.uuid),
|
||||
link.Link.make_link('bookmark', url,
|
||||
'nodes', node.uuid,
|
||||
bookmark=True)
|
||||
]
|
||||
bookmark=True)]
|
||||
return node
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -56,8 +56,7 @@ glance_client_opts = [
|
|||
default='publicURL',
|
||||
help=_(
|
||||
'Type of endpoint in Identity service catalog to use '
|
||||
'for communication with the OpenStack service.')),
|
||||
]
|
||||
'for communication with the OpenStack service.'))]
|
||||
|
||||
cfg.CONF.register_opts(heat_client_opts, group='heat_client')
|
||||
cfg.CONF.register_opts(glance_client_opts, group='glance_client')
|
||||
|
|
|
@ -117,7 +117,7 @@ class Bay(Base):
|
|||
__table_args__ = (
|
||||
schema.UniqueConstraint('uuid', name='uniq_bay0uuid'),
|
||||
table_args()
|
||||
)
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
project_id = Column(String(255))
|
||||
user_id = Column(String(255))
|
||||
|
@ -140,7 +140,7 @@ class BayLock(Base):
|
|||
__table_args__ = (
|
||||
schema.UniqueConstraint('bay_uuid', name='uniq_baylock0bay_uuid'),
|
||||
table_args()
|
||||
)
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
bay_uuid = Column(String(36))
|
||||
conductor_id = Column(String(64))
|
||||
|
@ -153,7 +153,7 @@ class BayModel(Base):
|
|||
__table_args__ = (
|
||||
schema.UniqueConstraint('uuid', name='uniq_baymodel0uuid'),
|
||||
table_args()
|
||||
)
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
uuid = Column(String(36))
|
||||
project_id = Column(String(255))
|
||||
|
@ -180,7 +180,7 @@ class Container(Base):
|
|||
__table_args__ = (
|
||||
schema.UniqueConstraint('uuid', name='uniq_container0uuid'),
|
||||
table_args()
|
||||
)
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
project_id = Column(String(255))
|
||||
user_id = Column(String(255))
|
||||
|
@ -201,7 +201,7 @@ class Node(Base):
|
|||
schema.UniqueConstraint('ironic_node_id',
|
||||
name='uniq_node0ironic_node_id'),
|
||||
table_args()
|
||||
)
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
uuid = Column(String(36))
|
||||
type = Column(String(20))
|
||||
|
@ -218,7 +218,7 @@ class Pod(Base):
|
|||
__table_args__ = (
|
||||
schema.UniqueConstraint('uuid', name='uniq_pod0uuid'),
|
||||
table_args()
|
||||
)
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
uuid = Column(String(36))
|
||||
name = Column(String(255))
|
||||
|
@ -238,7 +238,7 @@ class Service(Base):
|
|||
__table_args__ = (
|
||||
schema.UniqueConstraint('uuid', name='uniq_service0uuid'),
|
||||
table_args()
|
||||
)
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
uuid = Column(String(36))
|
||||
name = Column(String(255))
|
||||
|
@ -259,7 +259,7 @@ class ReplicationController(Base):
|
|||
schema.UniqueConstraint('uuid',
|
||||
name='uniq_replicationcontroller0uuid'),
|
||||
table_args()
|
||||
)
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
uuid = Column(String(36))
|
||||
name = Column(String(255))
|
||||
|
|
|
@ -59,7 +59,7 @@ class MagnumPersistentObject(object):
|
|||
fields = {
|
||||
'created_at': ovoo_fields.DateTimeField(nullable=True),
|
||||
'updated_at': ovoo_fields.DateTimeField(nullable=True),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MagnumObjectSerializer(ovoo_base.VersionedObjectSerializer):
|
||||
|
|
|
@ -414,12 +414,12 @@ class TestBayConductorWithK8s(base.TestCase):
|
|||
expected_node_addresses = ['ex_minion', 'address']
|
||||
|
||||
outputs = [
|
||||
{"output_value": expected_node_addresses,
|
||||
"description": "No description given",
|
||||
"output_key": "kube_minions_external"},
|
||||
{"output_value": expected_api_address,
|
||||
"description": "No description given",
|
||||
"output_key": "kube_master"}
|
||||
{"output_value": expected_node_addresses,
|
||||
"description": "No description given",
|
||||
"output_key": "kube_minions_external"},
|
||||
{"output_value": expected_api_address,
|
||||
"description": "No description given",
|
||||
"output_key": "kube_master"}
|
||||
]
|
||||
mock_stack = mock.MagicMock()
|
||||
mock_stack.outputs = outputs
|
||||
|
|
3
tox.ini
3
tox.ini
|
@ -48,13 +48,12 @@ commands =
|
|||
|
||||
[flake8]
|
||||
# H803 skipped on purpose per list discussion.
|
||||
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
|
||||
# E711 is ignored because it is normal to use "column == None" in sqlalchemy
|
||||
# The rest of the ignores are TODOs
|
||||
# New from hacking 0.9: E129, E131, H407, H405, H904
|
||||
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
|
||||
|
||||
ignore = E121,E122,E123,E124,E125,E131,E251,H302,H405,H803,H904,E711
|
||||
ignore = E131,E251,H302,H405,H803,H904,E711
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,magnum/common/pythonk8sclient
|
||||
|
||||
[testenv:pip-missing-reqs]
|
||||
|
|
Loading…
Reference in New Issue