Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruff, fix None type annot errors #1199

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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