Fix PEP8 E124 & E125 errors

Fix PEP8 E124 & E125 errors
    E124: closing bracket does not match visual indentation
    E125: continuation line with same indent as next logical line

Remove E124 & E125 from the ignore list for flake8

Change-Id: Ia9aee2fb7e0bb6771aad11d3523119944eeb4170
This commit is contained in:
John L. Villalovos 2015-02-19 10:12:02 -08:00
parent 9f114b147d
commit 45b525d341
12 changed files with 20 additions and 19 deletions

View File

@ -109,7 +109,7 @@ class V1(base.APIBase):
'developer/ironic/dev',
'api-spec-v1.html',
bookmark=True, type='text/html')
]
]
v1.media_types = [MediaType('application/json',
'application/vnd.openstack.ironic.v1+json')]
v1.chassis = [link.Link.make_link('self', pecan.request.host_url,
@ -118,28 +118,28 @@ class V1(base.APIBase):
pecan.request.host_url,
'chassis', '',
bookmark=True)
]
]
v1.nodes = [link.Link.make_link('self', pecan.request.host_url,
'nodes', ''),
link.Link.make_link('bookmark',
pecan.request.host_url,
'nodes', '',
bookmark=True)
]
]
v1.ports = [link.Link.make_link('self', pecan.request.host_url,
'ports', ''),
link.Link.make_link('bookmark',
pecan.request.host_url,
'ports', '',
bookmark=True)
]
]
v1.drivers = [link.Link.make_link('self', pecan.request.host_url,
'drivers', ''),
link.Link.make_link('bookmark',
pecan.request.host_url,
'drivers', '',
bookmark=True)
]
]
return v1

View File

@ -81,7 +81,7 @@ class Chassis(base.APIBase):
'chassis',
chassis.uuid + "/nodes",
bookmark=True)
]
]
chassis.links = [link.Link.make_link('self',
url,
'chassis', chassis.uuid),
@ -89,7 +89,7 @@ class Chassis(base.APIBase):
url,
'chassis', chassis.uuid,
bookmark=True)
]
]
return chassis
@classmethod

View File

@ -593,7 +593,7 @@ class Node(base.APIBase):
link.Link.make_link('bookmark', url, 'nodes',
node.uuid + "/ports",
bookmark=True)
]
]
# NOTE(lucasagomes): The numeric ID should not be exposed to
# the user, it's internal only.
@ -606,7 +606,7 @@ class Node(base.APIBase):
node.uuid),
link.Link.make_link('bookmark', url, 'nodes',
node.uuid, bookmark=True)
]
]
return node
@classmethod

View File

@ -119,7 +119,7 @@ class Port(base.APIBase):
link.Link.make_link('bookmark', url,
'ports', port.uuid,
bookmark=True)
]
]
return port
@classmethod

View File

@ -145,7 +145,7 @@ conductor_opts = [
help='List of comma separated metric types which need to be'
' sent to Ceilometer. The default value, "ALL", is a '
'special value meaning send all the sensor data.'
),
),
cfg.IntOpt('sync_local_state_interval',
default=180,
help='When conductors join or leave the cluster, existing '

View File

@ -29,7 +29,7 @@ import sqlalchemy as sa
def upgrade():
op.add_column('nodes',
sa.Column('console_enabled', sa.Boolean)
)
)
def downgrade():

View File

@ -33,7 +33,7 @@ ilo_client = importutils.try_import('proliantutils.ilo.ribcl')
BOOT_DEVICE_MAPPING_TO_ILO = {boot_devices.PXE: 'NETWORK',
boot_devices.DISK: 'HDD',
boot_devices.CDROM: 'CDROM'
}
}
BOOT_DEVICE_ILO_TO_GENERIC = {v: k
for k, v in BOOT_DEVICE_MAPPING_TO_ILO.items()}

View File

@ -230,7 +230,7 @@ def get_deploy_info(node, **kwargs):
'ephemeral_mb': 1024 * int(i_info['ephemeral_gb']),
'preserve_ephemeral': i_info['preserve_ephemeral'],
'node_uuid': node.uuid,
}
}
missing = [key for key in params if params[key] is None]
if missing:

View File

@ -40,7 +40,7 @@ class FakeMemcache(object):
'tenantId': '123i2910',
'tenantName': 'mytenant',
'roles': [{'name': 'admin'}]
},
},
}
},
'tokens/%s' % MEMBER_TOKEN: {
@ -52,7 +52,7 @@ class FakeMemcache(object):
'tenantId': 'project-good',
'tenantName': 'goodies',
'roles': [{'name': 'Member'}]
}
}
}
}
}

View File

@ -1819,7 +1819,8 @@ class UpdatePortTestCase(_ServiceSetUpMixin, tests_db_base.DbTestCase):
@mock.patch.object(dbapi.IMPL, 'get_nodeinfo_list')
@mock.patch.object(task_manager, 'acquire')
def test___send_sensor_data_disabled(self, acquire_mock,
get_nodeinfo_list_mock, _mapped_to_this_conductor_mock):
get_nodeinfo_list_mock,
_mapped_to_this_conductor_mock):
node = obj_utils.create_test_node(self.context,
driver='fake')
self._start_service()

View File

@ -427,7 +427,7 @@ class _TestObject(object):
'ironic_object.data':
{'created_at': timeutils.isotime(dt),
'updated_at': timeutils.isotime(dt),
}
}
}
actual = obj.obj_to_primitive()
# ironic_object.changes is built from a set and order is undefined

View File

@ -52,7 +52,7 @@ commands = {posargs}
[flake8]
# E711: ignored because it is normal to use "column == None" in sqlalchemy
ignore = E123,E124,E125,E126,E127,E128,E129,E711
ignore = E123,E126,E127,E128,E129,E711
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,*ironic/nova*
max-complexity=17