Browse Source

Enable check for E121

E121 continuation line under-indented for hanging indent

Change-Id: I4cf246e3ec932ba0d2391eb8bcb793b28b005b4c
Andrey Kurilin 4 years ago
parent
commit
7fc1588dfd

+ 1
- 1
novaclient/tests/fixture_data/certs.py View File

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

+ 1
- 1
novaclient/tests/fixture_data/floatingips.py View File

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

+ 7
- 6
novaclient/tests/test_shell.py View File

@@ -204,12 +204,13 @@ class ShellTest(utils.TestCase):
204 204
             dist_version.StrictVersion('0.7.2')):
205 205
             ex = '\n'
206 206
         else:
207
-            ex = (
208
-              '+----+------+--------+------------+-------------+----------+\n'
209
-              '| ID | Name | Status | Task State | Power State | Networks |\n'
210
-              '+----+------+--------+------------+-------------+----------+\n'
211
-              '+----+------+--------+------------+-------------+----------+\n'
212
-            )
207
+            ex = '\n'.join([
208
+                '+----+------+--------+------------+-------------+----------+',
209
+                '| ID | Name | Status | Task State | Power State | Networks |',
210
+                '+----+------+--------+------------+-------------+----------+',
211
+                '+----+------+--------+------------+-------------+----------+',
212
+                ''
213
+            ])
213 214
         self.make_env(exclude='OS_PASSWORD')
214 215
         stdout, stderr = self.shell('list')
215 216
         self.assertEqual((stdout + stderr), ex)

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

@@ -1989,8 +1989,8 @@ class FakeHTTPClient(base_client.HTTPClient):
1989 1989
                              "attached": "2011-11-11T00:00:00Z",
1990 1990
                              "size": 1024,
1991 1991
                              "attachments": [
1992
-                                {"id": "3333",
1993
-                                 "links": ''}],
1992
+                                 {"id": "3333",
1993
+                                  "links": ''}],
1994 1994
                              "metadata": {}}]})
1995 1995
 
1996 1996
     def get_servers_1234_os_volume_attachments_Work(self, **kw):
@@ -2003,8 +2003,8 @@ class FakeHTTPClient(base_client.HTTPClient):
2003 2003
                              "attached": "2011-11-11T00:00:00Z",
2004 2004
                              "size": 1024,
2005 2005
                              "attachments": [
2006
-                                {"id": "3333",
2007
-                                 "links": ''}],
2006
+                                 {"id": "3333",
2007
+                                  "links": ''}],
2008 2008
                              "metadata": {}}})
2009 2009
 
2010 2010
     def delete_servers_1234_os_volume_attachments_Work(self, **kw):
@@ -2072,21 +2072,21 @@ class FakeHTTPClient(base_client.HTTPClient):
2072 2072
         return self.get_os_cells_capacities()
2073 2073
 
2074 2074
     def get_os_migrations(self, **kw):
2075
-        migrations = {'migrations':
2076
-                          [{
2077
-                               "created_at": "2012-10-29T13:42:02.000000",
2078
-                               "dest_compute": "compute2",
2079
-                               "dest_host": "1.2.3.4",
2080
-                               "dest_node": "node2",
2081
-                               "id": 1234,
2082
-                               "instance_uuid": "instance_id_123",
2083
-                               "new_instance_type_id": 2,
2084
-                               "old_instance_type_id": 1,
2085
-                               "source_compute": "compute1",
2086
-                               "source_node": "node1",
2087
-                               "status": "Done",
2088
-                               "updated_at": "2012-10-29T13:42:02.000000"
2089
-                           }]}
2075
+        migrations = {'migrations': [
2076
+            {
2077
+                "created_at": "2012-10-29T13:42:02.000000",
2078
+                "dest_compute": "compute2",
2079
+                "dest_host": "1.2.3.4",
2080
+                "dest_node": "node2",
2081
+                "id": 1234,
2082
+                "instance_uuid": "instance_id_123",
2083
+                "new_instance_type_id": 2,
2084
+                "old_instance_type_id": 1,
2085
+                "source_compute": "compute1",
2086
+                "source_node": "node1",
2087
+                "status": "Done",
2088
+                "updated_at": "2012-10-29T13:42:02.000000"
2089
+            }]}
2090 2090
         return (200, {}, migrations)
2091 2091
 
2092 2092
     def post_os_server_external_events(self, **kw):

+ 4
- 4
novaclient/tests/v1_1/test_hypervisors.py View File

@@ -99,13 +99,13 @@ class HypervisorsTest(utils.FixturedTestCase):
99 99
             dict(id=1234,
100 100
                  hypervisor_hostname='hyper1',
101 101
                  servers=[
102
-                    dict(name='inst1', uuid='uuid1'),
103
-                    dict(name='inst2', uuid='uuid2')]),
102
+                     dict(name='inst1', uuid='uuid1'),
103
+                     dict(name='inst2', uuid='uuid2')]),
104 104
             dict(id=5678,
105 105
                  hypervisor_hostname='hyper2',
106 106
                  servers=[
107
-                    dict(name='inst3', uuid='uuid3'),
108
-                    dict(name='inst4', uuid='uuid4')]),
107
+                     dict(name='inst3', uuid='uuid3'),
108
+                     dict(name='inst4', uuid='uuid4')]),
109 109
             ]
110 110
 
111 111
         result = self.cs.hypervisors.search('hyper', True)

+ 2
- 2
novaclient/v1_1/servers.py View File

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

+ 2
- 2
novaclient/v3/servers.py View File

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

+ 3
- 2
tox.ini View File

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

Loading…
Cancel
Save