Skip to content

Commit

Permalink
Update ruff, fix None type annot errors
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Nov 18, 2024
1 parent 377c85c commit 209e54c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
3 changes: 1 addition & 2 deletions course/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,8 +1224,7 @@ def csv_data_importable(file_contents, column_idx_list, header_count):
return True, ""


def will_use_masked_profile_for_email(
recipient_email: None | str | list[str]) -> bool:
def will_use_masked_profile_for_email(recipient_email: str | list[str] | None) -> bool:
if not recipient_email:
return False
if not isinstance(recipient_email, list):
Expand Down
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prairietest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def has_access_to_exam(
exam_uuid: str,
now: datetime,
ip_address: IPv4Address | IPv6Address
) -> None | AllowEvent:
) -> AllowEvent | None:
facility_id_to_most_recent_allow_event: dict[int, AllowEvent] = {}
for allow_event in AllowEvent.objects.filter(
facility__course=course,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ urllib3 = "^1.26.19,<2"

[tool.poetry.dev-dependencies]
factory_boy = "^3.3.1"
ruff = "^0.7.3"
ruff = "^0.7.4"

django-stubs = { version ="5.1.*", extras = ["compatible-mypy"] }

Expand Down
4 changes: 2 additions & 2 deletions relate/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@
# {{{ app defaults

RELATE_FACILITIES: (
None
| dict[str, dict[str, Any]]
dict[str, dict[str, Any]]
| Callable[..., dict[str, dict[str, Any]]]
| None
) = {}

RELATE_TICKET_MINUTES_VALID_AFTER_USE = 0
Expand Down

0 comments on commit 209e54c

Please sign in to comment.