From d7b57c9bc3654c37882b4980eafb05bc571797d7 Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Mon, 1 Oct 2018 18:24:22 +0200 Subject: [PATCH] Run black & isort over the codebase. Change-Id: I084279e15560a1178376d8ef1ed91ea84c060982 --- ara/api/admin.py | 6 +- ara/api/apps.py | 2 +- ara/api/models.py | 100 +++++++++++++-------------- ara/api/serializers.py | 69 +++++++++--------- ara/api/tests/factories.py | 40 ++++------- ara/api/tests/tests_file.py | 63 +++++++---------- ara/api/tests/tests_file_content.py | 4 +- ara/api/tests/tests_host.py | 64 ++++++----------- ara/api/tests/tests_label.py | 50 +++++--------- ara/api/tests/tests_play.py | 46 +++++------- ara/api/tests/tests_playbook.py | 85 ++++++++++------------- ara/api/tests/tests_playbook_file.py | 41 +++++------ ara/api/tests/tests_result.py | 55 ++++++--------- ara/api/tests/tests_stats.py | 40 ++++------- ara/api/tests/tests_task.py | 99 +++++++++++++------------- ara/api/tests/utils.py | 6 +- ara/api/urls.py | 18 ++--- ara/api/views.py | 2 +- ara/server/admin.py | 4 +- ara/server/apps.py | 2 +- ara/server/urls.py | 5 +- 21 files changed, 346 insertions(+), 455 deletions(-) diff --git a/ara/api/admin.py b/ara/api/admin.py index 5145019..a359b9c 100644 --- a/ara/api/admin.py +++ b/ara/api/admin.py @@ -4,9 +4,9 @@ from django.contrib.auth.models import Group class RecordAdmin(admin.ModelAdmin): - list_display = ('id', 'key', 'value', 'type') - search_fields = ('key', 'value', 'type') - ordering = ('key',) + list_display = ("id", "key", "value", "type") + search_fields = ("key", "value", "type") + ordering = ("key",) admin.site.register(models.Record, RecordAdmin) diff --git a/ara/api/apps.py b/ara/api/apps.py index 12c9e1e..1a363c0 100644 --- a/ara/api/apps.py +++ b/ara/api/apps.py @@ -2,4 +2,4 @@ from django.apps import AppConfig class ApiConfig(AppConfig): - name = 'ara.api' + name = "ara.api" diff --git a/ara/api/models.py b/ara/api/models.py index 1de8feb..628beba 100644 --- a/ara/api/models.py +++ b/ara/api/models.py @@ -52,13 +52,13 @@ class FileContent(Base): """ class Meta: - db_table = 'file_contents' + db_table = "file_contents" sha1 = models.CharField(max_length=40, unique=True) contents = models.BinaryField(max_length=(2 ** 32) - 1) def __str__(self): - return '' % (self.id, self.sha1) + return "" % (self.id, self.sha1) class File(Base): @@ -68,13 +68,13 @@ class File(Base): """ class Meta: - db_table = 'files' + db_table = "files" path = models.CharField(max_length=255) - content = models.ForeignKey(FileContent, on_delete=models.CASCADE, related_name='files') + content = models.ForeignKey(FileContent, on_delete=models.CASCADE, related_name="files") def __str__(self): - return '' % (self.id, self.path) + return "" % (self.id, self.path) class Label(Base): @@ -90,13 +90,13 @@ class Label(Base): """ class Meta: - db_table = 'labels' + db_table = "labels" name = models.CharField(max_length=255) description = models.BinaryField(max_length=(2 ** 32) - 1) def __str__(self): - return '