Skip to content

Commit

Permalink
Fix linting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
YPCrumble committed Aug 23, 2024
1 parent bac6cca commit ae58e39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions anymail/backends/unisender_go.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ def __init__(
http_headers["Accept"] = "application/json"
http_headers["X-API-KEY"] = backend.api_key
kwargs["headers"] = http_headers
super().__init__(
message, defaults, backend, *args, **kwargs
)
super().__init__(message, defaults, backend, *args, **kwargs)

def get_api_endpoint(self) -> str:
return "email/send.json"
Expand Down Expand Up @@ -298,7 +296,9 @@ def set_send_at(self, send_at: datetime | str) -> None:
# "Date and time in the format “YYYY-MM-DD hh:mm:ss” in the UTC time zone."
# If send_at is a datetime, it's guaranteed to be aware, but maybe not UTC.
# Convert to UTC, then strip tzinfo to avoid isoformat "+00:00" at end.
send_at_utc = send_at.astimezone(timezone.utc).replace(tzinfo=None) # type:ignore[union-attr]
send_at_utc = send_at.astimezone( # type:ignore[union-attr]
timezone.utc
).replace(tzinfo=None)
send_at_formatted = send_at_utc.isoformat(sep=" ", timespec="seconds")
assert len(send_at_formatted) == 19
except (AttributeError, TypeError):
Expand Down

0 comments on commit ae58e39

Please sign in to comment.