style(translation): use datetime.UTC alias (ruff UP017)
CI / lint (push) Successful in 4s
CI / frontend-build (push) Successful in 18s
CI / backend-lint-and-test (push) Successful in 37s
CI / integration (push) Successful in 3m45s

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-07 21:04:17 -04:00
parent c64261593d
commit d631ed023c
+3 -3
View File
@@ -8,7 +8,7 @@ behind a reverse proxy). Full API contract: Scribe note #1347.
"""
from __future__ import annotations
from datetime import datetime, timezone
from datetime import UTC, datetime
from email.utils import parsedate_to_datetime
import requests
@@ -53,8 +53,8 @@ def _parse_retry_after(resp) -> float | None:
if when is None:
return None
if when.tzinfo is None:
when = when.replace(tzinfo=timezone.utc)
return max(0.0, (when - datetime.now(timezone.utc)).total_seconds())
when = when.replace(tzinfo=UTC)
return max(0.0, (when - datetime.now(UTC)).total_seconds())
def health(base_url: str, *, timeout: float = 5.0) -> bool: