Enable check for E131

* E131 continuation line unaligned for hanging indent

Change-Id: I719d5bcd1b51896c947e637f6dfce2e1f1a6bd2b
This commit is contained in:
Christian Berendt 2014-07-25 19:27:19 +02:00
parent aae7ca2f9b
commit 68f357d963
5 changed files with 46 additions and 40 deletions

View File

@ -38,7 +38,10 @@ class V1(base.Fixture):
'hypervisors': [
{
'id': 1234,
'service': {'id': 1, 'host': 'compute1'},
'service': {
'id': 1,
'host': 'compute1',
},
'vcpus': 4,
'memory_mb': 10 * 1024,
'local_gb': 250,
@ -57,22 +60,25 @@ class V1(base.Fixture):
},
{
'id': 2,
'service': {'id': 2, 'host': 'compute2'},
'vcpus': 4,
'memory_mb': 10 * 1024,
'local_gb': 250,
'vcpus_used': 2,
'memory_mb_used': 5 * 1024,
'local_gb_used': 125,
'hypervisor_type': 'xen',
'hypervisor_version': 3,
'hypervisor_hostname': 'hyper2',
'free_ram_mb': 5 * 1024,
'free_disk_gb': 125,
'current_workload': 2,
'running_vms': 2,
'cpu_info': 'cpu_info',
'disk_available_least': 100
'service': {
'id': 2,
'host': 'compute2',
},
'vcpus': 4,
'memory_mb': 10 * 1024,
'local_gb': 250,
'vcpus_used': 2,
'memory_mb_used': 5 * 1024,
'local_gb_used': 125,
'hypervisor_type': 'xen',
'hypervisor_version': 3,
'hypervisor_hostname': 'hyper2',
'free_ram_mb': 5 * 1024,
'free_disk_gb': 125,
'current_workload': 2,
'running_vms': 2,
'cpu_info': 'cpu_info',
'disk_available_least': 100
}
]
}

View File

@ -710,14 +710,14 @@ class FakeHTTPClient(base_client.HTTPClient):
if filter_is_public is not None:
if filter_is_public:
flavors['flavors'] = [
v for v in flavors['flavors']
if v['os-flavor-access:is_public']
]
v for v in flavors['flavors']
if v['os-flavor-access:is_public']
]
else:
flavors['flavors'] = [
v for v in flavors['flavors']
if not v['os-flavor-access:is_public']
]
v for v in flavors['flavors']
if not v['os-flavor-access:is_public']
]
return (200, {}, flavors)
@ -1344,7 +1344,7 @@ class FakeHTTPClient(base_client.HTTPClient):
six.u('total_vcpus_usage'): 49.71047423333333,
six.u('total_hours'): 49.71047423333333,
six.u('tenant_id'):
six.u('7b0a1d73f8fb41718f3343c207597869'),
six.u('7b0a1d73f8fb41718f3343c207597869'),
six.u('stop'): six.u('2012-01-22 19:48:41.750722'),
six.u('server_usages'): [{
six.u('hours'): 49.71047423333333,
@ -1353,7 +1353,7 @@ class FakeHTTPClient(base_client.HTTPClient):
six.u('ended_at'): None,
six.u('name'): six.u('f15image1'),
six.u('tenant_id'):
six.u('7b0a1d73f8fb41718f3343c207597869'),
six.u('7b0a1d73f8fb41718f3343c207597869'),
six.u('vcpus'): 1,
six.u('memory_mb'): 512,
six.u('state'): six.u('active'),
@ -1370,7 +1370,7 @@ class FakeHTTPClient(base_client.HTTPClient):
six.u('total_vcpus_usage'): 49.71047423333333,
six.u('total_hours'): 49.71047423333333,
six.u('tenant_id'):
six.u('7b0a1d73f8fb41718f3343c207597869'),
six.u('7b0a1d73f8fb41718f3343c207597869'),
six.u('stop'): six.u('2012-01-22 19:48:41.750722'),
six.u('server_usages'): [{
six.u('hours'): 49.71047423333333,

View File

@ -173,9 +173,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
'passwordCredentials': {
'username': cs.client.user,
'password': cs.client.password,
},
'tenantName': cs.client.projectid,
},
},
'tenantName': cs.client.projectid,
},
}
token_url = cs.client.auth_url + "/tokens"
@ -261,9 +261,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
'passwordCredentials': {
'username': cs.client.user,
'password': cs.client.password,
},
'tenantName': cs.client.projectid,
},
},
'tenantName': cs.client.projectid,
},
}
token_url = cs.client.auth_url + "/tokens"

View File

@ -104,14 +104,14 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
if filter_is_public is not None:
if filter_is_public:
flavors['flavors'] = [
v for v in flavors['flavors']
if v['flavor-access:is_public']
]
v for v in flavors['flavors']
if v['flavor-access:is_public']
]
else:
flavors['flavors'] = [
v for v in flavors['flavors']
if not v['flavor-access:is_public']
]
v for v in flavors['flavors']
if not v['flavor-access:is_public']
]
return (200, {}, flavors)

View File

@ -27,7 +27,7 @@ downloadcache = ~/cache/pip
[flake8]
# TODO fix following rules from hacking 0.9
# E131,E265,H402,H405,H904
ignore = E12,E131,E265,F811,F821,H302,H402,H404,H405,H904
# E265,H402,H405,H904
ignore = E12,E265,F811,F821,H302,H402,H404,H405,H904
show-source = True
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build