Skip to content

Commit

Permalink
Upgrade ruff to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCain committed Sep 3, 2024
1 parent 1b81df0 commit 414a7b6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
38 changes: 19 additions & 19 deletions poetry.lock

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

4 changes: 2 additions & 2 deletions ws/unsubscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ def unsubscribe_from_token(token: str) -> models.Participant:
try:
target = unsign_token(token)
except signing.BadSignature as e:
raise InvalidTokenError( # noqa: B904, TRY200
raise InvalidTokenError( # noqa: B904
f"{_bad_token_reason(e)}, cannot unsubscribe automatically."
)

try:
par = models.Participant.objects.get(pk=target.participant_pk) # Might raise!
except models.Participant.DoesNotExist:
raise InvalidTokenError("Participant no longer exists") # noqa: B904, TRY200
raise InvalidTokenError("Participant no longer exists") # noqa: B904

if EmailType.membership_renewal in target.email_types:
par.send_membership_reminder = False
Expand Down
2 changes: 1 addition & 1 deletion ws/waivers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import xml.etree.ElementTree as ET # noqa: N817
import xml.etree.ElementTree as ET
from typing import Any, NamedTuple, TypedDict, cast

import requests
Expand Down

0 comments on commit 414a7b6

Please sign in to comment.