Enable check for E123
E123 closing bracket does not match indentation of opening bracket's line Change-Id: I3f941032efb5ca2ef9a78f865effbf79c8674ebb
This commit is contained in:
parent
d05ae5dcc0
commit
8b8aa499e1
@ -1285,8 +1285,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
"tenant_id": "272bee4c1e624cd4a72a6b0ea55b4582",
|
||||
"id": 2,
|
||||
"rules": []}
|
||||
]}
|
||||
)
|
||||
]})
|
||||
|
||||
def get_os_security_groups_1(self, **kw):
|
||||
return (200, {}, {"security_group":
|
||||
@ -1649,8 +1648,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
def get_os_hypervisors(self, **kw):
|
||||
return (200, {}, {"hypervisors": [
|
||||
{'id': 1234, 'hypervisor_hostname': 'hyper1'},
|
||||
{'id': 5678, 'hypervisor_hostname': 'hyper2'},
|
||||
]})
|
||||
{'id': 5678, 'hypervisor_hostname': 'hyper2'}]})
|
||||
|
||||
def get_os_hypervisors_detail(self, **kw):
|
||||
return (200, {}, {"hypervisors": [
|
||||
@ -1709,8 +1707,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
def get_os_hypervisors_hyper_search(self, **kw):
|
||||
return (200, {}, {'hypervisors': [
|
||||
{'id': 1234, 'hypervisor_hostname': 'hyper1'},
|
||||
{'id': 5678, 'hypervisor_hostname': 'hyper2'}
|
||||
]})
|
||||
{'id': 5678, 'hypervisor_hostname': 'hyper2'}]})
|
||||
|
||||
def get_os_hypervisors_hyper_servers(self, **kw):
|
||||
return (200, {}, {'hypervisors': [
|
||||
@ -1718,14 +1715,12 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
'hypervisor_hostname': 'hyper1',
|
||||
'servers': [
|
||||
{'name': 'inst1', 'uuid': 'uuid1'},
|
||||
{'name': 'inst2', 'uuid': 'uuid2'}
|
||||
]},
|
||||
{'name': 'inst2', 'uuid': 'uuid2'}]},
|
||||
{'id': 5678,
|
||||
'hypervisor_hostname': 'hyper2',
|
||||
'servers': [
|
||||
{'name': 'inst3', 'uuid': 'uuid3'},
|
||||
{'name': 'inst4', 'uuid': 'uuid4'}
|
||||
]}
|
||||
{'name': 'inst4', 'uuid': 'uuid4'}]}
|
||||
]})
|
||||
|
||||
def get_os_hypervisors_hyper_no_servers_servers(self, **kw):
|
||||
@ -2051,8 +2046,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
'rpc_host': '10.0.1.10',
|
||||
'type': 'child',
|
||||
'name': 'cell1',
|
||||
'rpc_port': 5673
|
||||
},
|
||||
'rpc_port': 5673},
|
||||
'type': 'child',
|
||||
'rpc_port': 5673,
|
||||
'loaded': True
|
||||
|
@ -30,8 +30,7 @@ class HypervisorsTest(utils.FixturedTestCase):
|
||||
def test_hypervisor_index(self):
|
||||
expected = [
|
||||
dict(id=1234, hypervisor_hostname='hyper1'),
|
||||
dict(id=5678, hypervisor_hostname='hyper2'),
|
||||
]
|
||||
dict(id=5678, hypervisor_hostname='hyper2')]
|
||||
|
||||
result = self.cs.hypervisors.list(False)
|
||||
self.assert_called('GET', '/os-hypervisors')
|
||||
@ -85,8 +84,7 @@ class HypervisorsTest(utils.FixturedTestCase):
|
||||
def test_hypervisor_search(self):
|
||||
expected = [
|
||||
dict(id=1234, hypervisor_hostname='hyper1'),
|
||||
dict(id=5678, hypervisor_hostname='hyper2'),
|
||||
]
|
||||
dict(id=5678, hypervisor_hostname='hyper2')]
|
||||
|
||||
result = self.cs.hypervisors.search('hyper')
|
||||
self.assert_called('GET', '/os-hypervisors/hyper/search')
|
||||
|
@ -640,7 +640,8 @@ class ServersTest(utils.FixturedTestCase):
|
||||
'port_id': 'f35079da-36d5-4513-8ec1-0298d703f70e',
|
||||
'mac_addr': 'fa:16:3e:4c:37:c8',
|
||||
'port_state': 'ACTIVE',
|
||||
'fixed_ips': [{
|
||||
'fixed_ips': [
|
||||
{
|
||||
'subnet_id': 'f1ad93ad-2967-46ba-b403-e8cbbe65f7fa',
|
||||
'ip_address': '10.2.0.96'
|
||||
}]
|
||||
|
@ -336,12 +336,10 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
|
||||
def get_os_hypervisors_search(self, **kw):
|
||||
if kw['query'] == 'hyper1':
|
||||
return (200, {}, {'hypervisors': [
|
||||
{'id': 1234, 'hypervisor_hostname': 'hyper1'},
|
||||
]})
|
||||
{'id': 1234, 'hypervisor_hostname': 'hyper1'}]})
|
||||
return (200, {}, {'hypervisors': [
|
||||
{'id': 1234, 'hypervisor_hostname': 'hyper1'},
|
||||
{'id': 5678, 'hypervisor_hostname': 'hyper2'}
|
||||
]})
|
||||
{'id': 5678, 'hypervisor_hostname': 'hyper2'}]})
|
||||
|
||||
def get_os_hypervisors_1234_servers(self, **kw):
|
||||
return (200, {}, {'hypervisor':
|
||||
@ -349,9 +347,7 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
|
||||
'hypervisor_hostname': 'hyper1',
|
||||
'servers': [
|
||||
{'name': 'inst1', 'id': 'uuid1'},
|
||||
{'name': 'inst2', 'id': 'uuid2'}
|
||||
]},
|
||||
})
|
||||
{'name': 'inst2', 'id': 'uuid2'}]}})
|
||||
|
||||
#
|
||||
# Keypairs
|
||||
|
@ -26,8 +26,7 @@ class HypervisorsTest(test_hypervisors.HypervisorsTest):
|
||||
def test_hypervisor_search(self):
|
||||
expected = [
|
||||
dict(id=1234, hypervisor_hostname='hyper1'),
|
||||
dict(id=5678, hypervisor_hostname='hyper2'),
|
||||
]
|
||||
dict(id=5678, hypervisor_hostname='hyper2')]
|
||||
|
||||
result = self.cs.hypervisors.search('hyper')
|
||||
self.assert_called('GET', '/os-hypervisors/search?query=hyper')
|
||||
|
4
tox.ini
4
tox.ini
@ -41,9 +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: E123, E124, E126,
|
||||
# Additional checks are also ignored on purpose: E124, E126,
|
||||
# E127, E128, E129, F811, F821
|
||||
ignore = E123,E124,E126,E127,E128,E129,F811,F821,H402,H404,H405,H904
|
||||
ignore = 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user