From fe66a887aa0b4269365fa999c1ab272402121c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maik=20Fr=C3=B6be?= Date: Tue, 10 Dec 2024 13:23:57 +0100 Subject: [PATCH] fix linter --- .../src/tira_app/endpoints/v1/_anonymous.py | 3 ++- application/src/tira_app/endpoints/vm_api.py | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/application/src/tira_app/endpoints/v1/_anonymous.py b/application/src/tira_app/endpoints/v1/_anonymous.py index e131c338..dc3717e9 100644 --- a/application/src/tira_app/endpoints/v1/_anonymous.py +++ b/application/src/tira_app/endpoints/v1/_anonymous.py @@ -1,6 +1,7 @@ +import html import json from pathlib import Path -import html + from django.conf import settings from django.core.cache import cache from django.http import HttpResponseServerError diff --git a/application/src/tira_app/endpoints/vm_api.py b/application/src/tira_app/endpoints/vm_api.py index 2ec740a4..da0fc6eb 100644 --- a/application/src/tira_app/endpoints/vm_api.py +++ b/application/src/tira_app/endpoints/vm_api.py @@ -1,5 +1,5 @@ -import json import html +import json import logging import shutil import uuid @@ -514,13 +514,18 @@ def anonymous_upload(request, dataset_id): or not dataset["task"] ): return HttpResponseServerError( - json.dumps({"status": 1, "message": f"Uploads are not allowed for the dataset {html.escape(dataset_id)}."}) + json.dumps( + {"status": 1, "message": f"Uploads are not allowed for the dataset {html.escape(dataset_id)}."} + ) ) if dataset["is_deprecated"]: return HttpResponseServerError( json.dumps( - {"status": 1, "message": f"The dataset {html.escape(dataset_id)} is deprecated and therefore allows no uploads."} + { + "status": 1, + "message": f"The dataset {html.escape(dataset_id)} is deprecated and therefore allows no uploads.", + } ) ) @@ -528,7 +533,10 @@ def anonymous_upload(request, dataset_id): if not task or not task["featured"]: return HttpResponseServerError( json.dumps( - {"status": 1, "message": f"The dataset {html.escape(dataset_id)} is deprecated and therefore allows no uploads."} + { + "status": 1, + "message": f"The dataset {html.escape(dataset_id)} is deprecated and therefore allows no uploads.", + } ) )