test(login): satisfy type and coverage gates
lint / lint (push) Successful in 46s
test / stage-firecracker-inputs (pull_request) Successful in 2s
test / integration-docker (pull_request) Successful in 7s
tracker-policy-pr / check-pr (pull_request) Successful in 7s
test / unit (pull_request) Successful in 1m30s
test / build-infra (pull_request) Successful in 4m11s
test / integration-firecracker (pull_request) Successful in 1m47s
test / coverage (pull_request) Failing after 1m6s
test / publish-infra (pull_request) Has been skipped

This commit is contained in:
2026-07-21 04:18:29 +00:00
parent 2e1074b659
commit 67cb51352a
2 changed files with 74 additions and 10 deletions
+3 -2
View File
@@ -23,6 +23,7 @@ import time
import urllib.error
import urllib.request
from pathlib import Path
from typing import Any
from ..paths import bot_bottle_root
@@ -49,7 +50,7 @@ def _flag(argv: list[str], name: str) -> str | None:
return None
def _post(url: str, payload: dict) -> dict:
def _post(url: str, payload: dict[str, Any]) -> dict[str, Any]:
data = json.dumps(payload).encode()
req = urllib.request.Request(
url, data=data, headers={"Content-Type": "application/json"}
@@ -58,7 +59,7 @@ def _post(url: str, payload: dict) -> dict:
return json.loads(resp.read())
def _get(url: str) -> tuple[int, dict]:
def _get(url: str) -> tuple[int, dict[str, Any]]:
req = urllib.request.Request(url)
try:
with urllib.request.urlopen(req, timeout=10) as resp: