diff --git a/api/tests.py b/api/tests.py index 7ce503c2..e69de29b 100644 --- a/api/tests.py +++ b/api/tests.py @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/common/migrations/0001_initial.py b/common/migrations/0001_initial.py index db6f2e41..c01072dd 100644 --- a/common/migrations/0001_initial.py +++ b/common/migrations/0001_initial.py @@ -1,6 +1,5 @@ # Generated by Django 3.0a1 on 2019-11-07 19:42 -import common.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion diff --git a/common/models.py b/common/models.py index 9be1e75e..8740a938 100644 --- a/common/models.py +++ b/common/models.py @@ -143,7 +143,7 @@ def fix(s): days = ['po', 'ut', 'st', 'ct', 'pa', 'so', 'ne'] self.day = days.index(fix(self.day.lower())) return self.day * 60 * 60 * 24 + self.time.hour * 60 * 60 + self.time.minute * 60 - except ValueError as e: + except ValueError: return 0 def summary(self, login, show_output=False): diff --git a/survey/views.py b/survey/views.py index 00ec63d8..2a3b84a0 100644 --- a/survey/views.py +++ b/survey/views.py @@ -132,7 +132,7 @@ def show(request, survey_file): "form": form, "survey": conf, }) - except FileNotFoundError as e: + except FileNotFoundError: raise Http404() except SurveyError as e: if not is_teacher(request.user): diff --git a/web/apps.py b/web/apps.py index bd452bbf..23cb3428 100644 --- a/web/apps.py +++ b/web/apps.py @@ -4,5 +4,5 @@ class WebConfig(AppConfig): name = 'web' def ready(self): - import web.signals + import web.signals # noqa: F401 diff --git a/web/tests.py b/web/tests.py index 7ce503c2..e69de29b 100644 --- a/web/tests.py +++ b/web/tests.py @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/web/views/student.py b/web/views/student.py index 9d95ef07..8c95fdc7 100644 --- a/web/views/student.py +++ b/web/views/student.py @@ -131,7 +131,7 @@ def get(submit): results = [] try: results = EvaluationResult(submit.pipeline_path()) - except json.JSONDecodeError as e: + except json.JSONDecodeError: # TODO: show error pass @@ -836,7 +836,7 @@ def task_asset(request, task_name, path): if mime: resp['Content-Type'] = f"{mime};charset=utf-8" return resp - except FileNotFoundError as e: + except FileNotFoundError: # Download directory as a .zip archive. # .tar.gz is also allowed as an extension to keep backwards compatibility archive_extensions = ['.tar.gz', '.zip']