diff --git a/anymail/backends/unisender_go.py b/anymail/backends/unisender_go.py index a1e187d6..124cbef0 100644 --- a/anymail/backends/unisender_go.py +++ b/anymail/backends/unisender_go.py @@ -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" @@ -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):