From 76702e0d37b6558ef42efd771522cbf16516fc34 Mon Sep 17 00:00:00 2001 From: JasonGrace2282 Date: Sun, 4 Aug 2024 10:32:52 -0400 Subject: [PATCH 1/2] Change ruff target-python to 3.11 --- .gitignore | 3 +++ pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 66b286ba..76e2db25 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ docs/build/ docs/source/reference/ .coverage + +# from prettier +node_modules/ diff --git a/pyproject.toml b/pyproject.toml index eb5d2821..4c619937 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ show-fixes = false line-length = 100 -target-version = "py38" +target-version = "py311" [tool.ruff.lint] select = [ From 16d449cd198fd91247dc642e73944b3a78639c81 Mon Sep 17 00:00:00 2001 From: JasonGrace2282 Date: Sun, 4 Aug 2024 10:34:45 -0400 Subject: [PATCH 2/2] Autofixes from pre-commit --- tin/apps/assignments/forms.py | 2 +- tin/apps/submissions/views.py | 2 +- tin/tests/utils.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tin/apps/assignments/forms.py b/tin/apps/assignments/forms.py index 1dc73032..bca6c406 100644 --- a/tin/apps/assignments/forms.py +++ b/tin/apps/assignments/forms.py @@ -1,7 +1,7 @@ from __future__ import annotations +from collections.abc import Iterable from logging import getLogger -from typing import Iterable from django import forms from django.conf import settings diff --git a/tin/apps/submissions/views.py b/tin/apps/submissions/views.py index 435ca7c0..206f266d 100644 --- a/tin/apps/submissions/views.py +++ b/tin/apps/submissions/views.py @@ -295,7 +295,7 @@ def filter_view(request): "submissions/filter.html", { "form": filter_form, - "submissions": list(zip(queryset, submission_texts)), + "submissions": list(zip(queryset, submission_texts, strict=False)), "action": "show_code", "nav_item": "Filter submissions", }, diff --git a/tin/tests/utils.py b/tin/tests/utils.py index 3357a829..75efee2f 100644 --- a/tin/tests/utils.py +++ b/tin/tests/utils.py @@ -6,7 +6,8 @@ "to_html", ) -from typing import TYPE_CHECKING, Any, Callable, Literal +from collections.abc import Callable +from typing import TYPE_CHECKING, Any, Literal import pytest from django.template import Context, Engine