Enable check for E121

E121 continuation line under-indented for hanging indent

Change-Id: I4cf246e3ec932ba0d2391eb8bcb793b28b005b4c
This commit is contained in:
Andrey Kurilin 2014-09-24 22:10:34 +03:00
parent 963484513d
commit 7fc1588dfd
8 changed files with 39 additions and 37 deletions

View File

@ -48,7 +48,7 @@ class Fixture(base.Fixture):
'certificate': {
'private_key': 'foo',
'data': 'bar'
}
}
}
self.requests.register_uri('POST', self.url(),
json=post_os_certificates,

View File

@ -109,7 +109,7 @@ class DNSFixture(base.Fixture):
'name': "host1",
'type': "A",
'domain': 'testdomain'
}
}
},
{
'dns_entry': {

View File

@ -204,12 +204,13 @@ class ShellTest(utils.TestCase):
dist_version.StrictVersion('0.7.2')):
ex = '\n'
else:
ex = (
'+----+------+--------+------------+-------------+----------+\n'
'| ID | Name | Status | Task State | Power State | Networks |\n'
'+----+------+--------+------------+-------------+----------+\n'
'+----+------+--------+------------+-------------+----------+\n'
)
ex = '\n'.join([
'+----+------+--------+------------+-------------+----------+',
'| ID | Name | Status | Task State | Power State | Networks |',
'+----+------+--------+------------+-------------+----------+',
'+----+------+--------+------------+-------------+----------+',
''
])
self.make_env(exclude='OS_PASSWORD')
stdout, stderr = self.shell('list')
self.assertEqual((stdout + stderr), ex)

View File

@ -1989,8 +1989,8 @@ class FakeHTTPClient(base_client.HTTPClient):
"attached": "2011-11-11T00:00:00Z",
"size": 1024,
"attachments": [
{"id": "3333",
"links": ''}],
{"id": "3333",
"links": ''}],
"metadata": {}}]})
def get_servers_1234_os_volume_attachments_Work(self, **kw):
@ -2003,8 +2003,8 @@ class FakeHTTPClient(base_client.HTTPClient):
"attached": "2011-11-11T00:00:00Z",
"size": 1024,
"attachments": [
{"id": "3333",
"links": ''}],
{"id": "3333",
"links": ''}],
"metadata": {}}})
def delete_servers_1234_os_volume_attachments_Work(self, **kw):
@ -2072,21 +2072,21 @@ class FakeHTTPClient(base_client.HTTPClient):
return self.get_os_cells_capacities()
def get_os_migrations(self, **kw):
migrations = {'migrations':
[{
"created_at": "2012-10-29T13:42:02.000000",
"dest_compute": "compute2",
"dest_host": "1.2.3.4",
"dest_node": "node2",
"id": 1234,
"instance_uuid": "instance_id_123",
"new_instance_type_id": 2,
"old_instance_type_id": 1,
"source_compute": "compute1",
"source_node": "node1",
"status": "Done",
"updated_at": "2012-10-29T13:42:02.000000"
}]}
migrations = {'migrations': [
{
"created_at": "2012-10-29T13:42:02.000000",
"dest_compute": "compute2",
"dest_host": "1.2.3.4",
"dest_node": "node2",
"id": 1234,
"instance_uuid": "instance_id_123",
"new_instance_type_id": 2,
"old_instance_type_id": 1,
"source_compute": "compute1",
"source_node": "node1",
"status": "Done",
"updated_at": "2012-10-29T13:42:02.000000"
}]}
return (200, {}, migrations)
def post_os_server_external_events(self, **kw):

View File

@ -99,13 +99,13 @@ class HypervisorsTest(utils.FixturedTestCase):
dict(id=1234,
hypervisor_hostname='hyper1',
servers=[
dict(name='inst1', uuid='uuid1'),
dict(name='inst2', uuid='uuid2')]),
dict(name='inst1', uuid='uuid1'),
dict(name='inst2', uuid='uuid2')]),
dict(id=5678,
hypervisor_hostname='hyper2',
servers=[
dict(name='inst3', uuid='uuid3'),
dict(name='inst4', uuid='uuid4')]),
dict(name='inst3', uuid='uuid3'),
dict(name='inst4', uuid='uuid4')]),
]
result = self.cs.hypervisors.search('hyper', True)

View File

@ -486,8 +486,8 @@ class ServerManager(base.BootingManagerWithFind):
body["server"]["max_count"] = max_count
if security_groups:
body["server"]["security_groups"] =\
[{'name': sg} for sg in security_groups]
body["server"]["security_groups"] = [{'name': sg}
for sg in security_groups]
# Files are a slight bit tricky. They're passed in a "personality"
# list to the POST. Each item is a dict giving a file name and the

View File

@ -428,8 +428,8 @@ class ServerManager(base.BootingManagerWithFind):
body["server"]["os-multiple-create:max_count"] = max_count
if security_groups:
body["server"]["security_groups"] = \
[{'name': sg} for sg in security_groups]
body["server"]["security_groups"] = [{'name': sg}
for sg in security_groups]
if availability_zone:
body["server"][

View File

@ -41,8 +41,9 @@ downloadcache = ~/cache/pip
# H904 wrap long lines in parentheses instead of a backslash
# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
#
# Additional checks are also ignored on purpose: E12, F811, F821
ignore = E12,F811,F821,H402,H404,H405,H904
# Additional checks are also ignored on purpose: E122, E123, E124, E126,
# E127, E128, E129, F811, F821
ignore = E122,E123,E124,E126,E127,E128,E129,F811,F821,H402,H404,H405,H904
show-source = True
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/source/conf.py