Skip to content

Commit 9a04b32

Browse files
author
Gabriel Monroy
committed
resolve remaining flake8 issues
1 parent 73a1d37 commit 9a04b32

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

api/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def converge(self, databag):
436436
def destroy(self):
437437
# create subtasks to terminate all nodes in parallel
438438
all_layers = self.layer_set.all()
439-
tasks = [ layer.destroy(async=True) for layer in all_layers ]
439+
tasks = [layer.destroy(async=True) for layer in all_layers]
440440
node_tasks, layer_tasks = [], []
441441
for n, l in tasks:
442442
node_tasks.extend(n), layer_tasks.extend(l)
@@ -491,12 +491,12 @@ def build(self, *args, **kwargs):
491491
def destroy(self, async=False):
492492
tasks = import_tasks(self.flavor.provider.type)
493493
# create subtasks to terminate all nodes in parallel
494-
node_tasks = [ node.destroy(async=True) for node in self.node_set.all() ]
494+
node_tasks = [node.destroy(async=True) for node in self.node_set.all()]
495495
# purge other hosting provider infrastructure
496496
name = "{0}-{1}".format(self.formation.id, self.id)
497497
args = (name, self.flavor.provider.creds.copy(),
498498
self.flavor.params.copy())
499-
layer_tasks = [ tasks.destroy_layer.subtask(args) ]
499+
layer_tasks = [tasks.destroy_layer.subtask(args)]
500500
if async:
501501
return node_tasks, layer_tasks
502502
# destroy nodes, then the layer

api/tests/layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def test_layer_scale(self):
161161

162162
def test_layer_scale_no_creds(self):
163163
url = '/api/providers/autotest'
164-
body = {'creds': json.dumps({}) }
164+
body = {'creds': json.dumps({})}
165165
response = self.client.patch(url, json.dumps(body), content_type='application/json')
166166
self.assertEqual(response.status_code, 200)
167167
# try to scale and a formation

0 commit comments

Comments
 (0)