fix: resolve all invalid-return-type ty diagnostics across codebase

Widen return type annotations to match actual control flow, add
unreachable assertions after retry loops ty cannot prove terminate,
split ambiguous union returns (auth.py credential pool), and remove
the AIOHTTP_AVAILABLE conditional-import guard from api_server.py.
This commit is contained in:
alt-glitch 2026-04-21 14:55:09 +05:30
parent 432614591a
commit 4a95029e6c
23 changed files with 102 additions and 103 deletions

View file

@ -26,6 +26,7 @@ import shutil
import subprocess
import sys
from collections import defaultdict
from typing import Optional
from datetime import datetime
from pathlib import Path
@ -685,7 +686,7 @@ def get_commits(since_tag=None):
return commits
def get_pr_number(subject: str) -> str:
def get_pr_number(subject: str) -> Optional[str]:
"""Extract PR number from commit subject if present."""
match = re.search(r"#(\d+)", subject)
if match: