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': { 'certificate': {
'private_key': 'foo', 'private_key': 'foo',
'data': 'bar' 'data': 'bar'
} }
} }
self.requests.register_uri('POST', self.url(), self.requests.register_uri('POST', self.url(),
json=post_os_certificates, json=post_os_certificates,

View File

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

View File

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

View File

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

View File

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

View File

@ -486,8 +486,8 @@ class ServerManager(base.BootingManagerWithFind):
body["server"]["max_count"] = max_count body["server"]["max_count"] = max_count
if security_groups: if security_groups:
body["server"]["security_groups"] =\ body["server"]["security_groups"] = [{'name': sg}
[{'name': sg} for sg in security_groups] for sg in security_groups]
# Files are a slight bit tricky. They're passed in a "personality" # 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 # 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 body["server"]["os-multiple-create:max_count"] = max_count
if security_groups: if security_groups:
body["server"]["security_groups"] = \ body["server"]["security_groups"] = [{'name': sg}
[{'name': sg} for sg in security_groups] for sg in security_groups]
if availability_zone: if availability_zone:
body["server"][ body["server"][

View File

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