Skip to content

Commit

Permalink
Ruff python (#66)
Browse files Browse the repository at this point in the history
Followup to #22 - change ruff to use python 3.11 as the base version to
get more up-to-date changes (from e.g. `pyupgrade`)
  • Loading branch information
JasonGrace2282 authored Aug 5, 2024
1 parent 08016d3 commit 452185b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ docs/build/
docs/source/reference/

.coverage

# from prettier
node_modules/
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ show-fixes = false

line-length = 100

target-version = "py38"
target-version = "py311"

[tool.ruff.lint]
select = [
Expand Down
2 changes: 1 addition & 1 deletion tin/apps/assignments/forms.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tin/apps/submissions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
3 changes: 2 additions & 1 deletion tin/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 452185b

Please sign in to comment.