From d06356e1f5dc3640dc5e1de01deffc2b65f3a4a9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 21:07:17 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tin/apps/assignments/forms.py | 2 +- tin/apps/assignments/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tin/apps/assignments/forms.py b/tin/apps/assignments/forms.py index bca6c406..94eb055f 100644 --- a/tin/apps/assignments/forms.py +++ b/tin/apps/assignments/forms.py @@ -178,7 +178,7 @@ class Meta: } def __str__(self) -> str: - return f"AssignmentForm(\"{self['name'].value()}\")" + return f'AssignmentForm("{self["name"].value()}")' class GraderScriptUploadForm(forms.Form): diff --git a/tin/apps/assignments/views.py b/tin/apps/assignments/views.py index 72673068..68abd79a 100644 --- a/tin/apps/assignments/views.py +++ b/tin/apps/assignments/views.py @@ -372,7 +372,7 @@ def download_grader_view(request, assignment_id): with grader_file.open() as f_obj: response = http.HttpResponse(f_obj.read(), content_type="text/plain") - filename = f'{assignment.name.replace(" ", "_")}_{grader_file.name.split("/")[-1]}' + filename = f"{assignment.name.replace(' ', '_')}_{grader_file.name.split('/')[-1]}" response["Content-Disposition"] = f'attachment; filename="{filename}"' return response