Browse Source

Enable check for E131

* E131 continuation line unaligned for hanging indent

Change-Id: I719d5bcd1b51896c947e637f6dfce2e1f1a6bd2b
Christian Berendt 4 years ago
parent
commit
68f357d963

+ 23
- 17
novaclient/tests/fixture_data/hypervisors.py View File

@@ -38,7 +38,10 @@ class V1(base.Fixture):
38 38
             'hypervisors': [
39 39
                 {
40 40
                     'id': 1234,
41
-                    'service': {'id': 1, 'host': 'compute1'},
41
+                    'service': {
42
+                        'id': 1,
43
+                        'host': 'compute1',
44
+                    },
42 45
                     'vcpus': 4,
43 46
                     'memory_mb': 10 * 1024,
44 47
                     'local_gb': 250,
@@ -57,22 +60,25 @@ class V1(base.Fixture):
57 60
                 },
58 61
                 {
59 62
                     'id': 2,
60
-                     'service': {'id': 2, 'host': 'compute2'},
61
-                     'vcpus': 4,
62
-                     'memory_mb': 10 * 1024,
63
-                     'local_gb': 250,
64
-                     'vcpus_used': 2,
65
-                     'memory_mb_used': 5 * 1024,
66
-                     'local_gb_used': 125,
67
-                     'hypervisor_type': 'xen',
68
-                     'hypervisor_version': 3,
69
-                     'hypervisor_hostname': 'hyper2',
70
-                     'free_ram_mb': 5 * 1024,
71
-                     'free_disk_gb': 125,
72
-                     'current_workload': 2,
73
-                     'running_vms': 2,
74
-                     'cpu_info': 'cpu_info',
75
-                     'disk_available_least': 100
63
+                    'service': {
64
+                        'id': 2,
65
+                        'host': 'compute2',
66
+                    },
67
+                    'vcpus': 4,
68
+                    'memory_mb': 10 * 1024,
69
+                    'local_gb': 250,
70
+                    'vcpus_used': 2,
71
+                    'memory_mb_used': 5 * 1024,
72
+                    'local_gb_used': 125,
73
+                    'hypervisor_type': 'xen',
74
+                    'hypervisor_version': 3,
75
+                    'hypervisor_hostname': 'hyper2',
76
+                    'free_ram_mb': 5 * 1024,
77
+                    'free_disk_gb': 125,
78
+                    'current_workload': 2,
79
+                    'running_vms': 2,
80
+                    'cpu_info': 'cpu_info',
81
+                    'disk_available_least': 100
76 82
                 }
77 83
             ]
78 84
         }

+ 9
- 9
novaclient/tests/v1_1/fakes.py View File

@@ -710,14 +710,14 @@ class FakeHTTPClient(base_client.HTTPClient):
710 710
         if filter_is_public is not None:
711 711
             if filter_is_public:
712 712
                 flavors['flavors'] = [
713
-                        v for v in flavors['flavors']
714
-                            if v['os-flavor-access:is_public']
715
-                        ]
713
+                    v for v in flavors['flavors']
714
+                    if v['os-flavor-access:is_public']
715
+                ]
716 716
             else:
717 717
                 flavors['flavors'] = [
718
-                        v for v in flavors['flavors']
719
-                            if not v['os-flavor-access:is_public']
720
-                        ]
718
+                    v for v in flavors['flavors']
719
+                    if not v['os-flavor-access:is_public']
720
+                ]
721 721
 
722 722
         return (200, {}, flavors)
723 723
 
@@ -1344,7 +1344,7 @@ class FakeHTTPClient(base_client.HTTPClient):
1344 1344
                     six.u('total_vcpus_usage'): 49.71047423333333,
1345 1345
                     six.u('total_hours'): 49.71047423333333,
1346 1346
                     six.u('tenant_id'):
1347
-                         six.u('7b0a1d73f8fb41718f3343c207597869'),
1347
+                        six.u('7b0a1d73f8fb41718f3343c207597869'),
1348 1348
                     six.u('stop'): six.u('2012-01-22 19:48:41.750722'),
1349 1349
                     six.u('server_usages'): [{
1350 1350
                         six.u('hours'): 49.71047423333333,
@@ -1353,7 +1353,7 @@ class FakeHTTPClient(base_client.HTTPClient):
1353 1353
                         six.u('ended_at'): None,
1354 1354
                         six.u('name'): six.u('f15image1'),
1355 1355
                         six.u('tenant_id'):
1356
-                             six.u('7b0a1d73f8fb41718f3343c207597869'),
1356
+                            six.u('7b0a1d73f8fb41718f3343c207597869'),
1357 1357
                         six.u('vcpus'): 1,
1358 1358
                         six.u('memory_mb'): 512,
1359 1359
                         six.u('state'): six.u('active'),
@@ -1370,7 +1370,7 @@ class FakeHTTPClient(base_client.HTTPClient):
1370 1370
                     six.u('total_vcpus_usage'): 49.71047423333333,
1371 1371
                     six.u('total_hours'): 49.71047423333333,
1372 1372
                     six.u('tenant_id'):
1373
-                         six.u('7b0a1d73f8fb41718f3343c207597869'),
1373
+                        six.u('7b0a1d73f8fb41718f3343c207597869'),
1374 1374
                     six.u('stop'): six.u('2012-01-22 19:48:41.750722'),
1375 1375
                     six.u('server_usages'): [{
1376 1376
                         six.u('hours'): 49.71047423333333,

+ 6
- 6
novaclient/tests/v1_1/test_auth.py View File

@@ -173,9 +173,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
173 173
                     'passwordCredentials': {
174 174
                         'username': cs.client.user,
175 175
                         'password': cs.client.password,
176
-                     },
177
-                     'tenantName': cs.client.projectid,
178
-                 },
176
+                    },
177
+                    'tenantName': cs.client.projectid,
178
+                },
179 179
             }
180 180
 
181 181
             token_url = cs.client.auth_url + "/tokens"
@@ -261,9 +261,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
261 261
                     'passwordCredentials': {
262 262
                         'username': cs.client.user,
263 263
                         'password': cs.client.password,
264
-                     },
265
-                     'tenantName': cs.client.projectid,
266
-                 },
264
+                    },
265
+                    'tenantName': cs.client.projectid,
266
+                },
267 267
             }
268 268
 
269 269
             token_url = cs.client.auth_url + "/tokens"

+ 6
- 6
novaclient/tests/v3/fakes.py View File

@@ -104,14 +104,14 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
104 104
         if filter_is_public is not None:
105 105
             if filter_is_public:
106 106
                 flavors['flavors'] = [
107
-                        v for v in flavors['flavors']
108
-                            if v['flavor-access:is_public']
109
-                        ]
107
+                    v for v in flavors['flavors']
108
+                    if v['flavor-access:is_public']
109
+                ]
110 110
             else:
111 111
                 flavors['flavors'] = [
112
-                        v for v in flavors['flavors']
113
-                            if not v['flavor-access:is_public']
114
-                        ]
112
+                    v for v in flavors['flavors']
113
+                    if not v['flavor-access:is_public']
114
+                ]
115 115
 
116 116
         return (200, {}, flavors)
117 117
 

+ 2
- 2
tox.ini View File

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

Loading…
Cancel
Save