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 d3dde0b459
commit 224e6d46d9
23 changed files with 102 additions and 103 deletions

View file

@ -151,7 +151,7 @@ def _resolve_system_dns() -> set[str]:
"""Return the IPv4 addresses that the OS resolver gives for api.telegram.org."""
try:
results = socket.getaddrinfo(_TELEGRAM_API_HOST, 443, socket.AF_INET)
return {addr[4][0] for addr in results}
return {str(addr[4][0]) for addr in results}
except Exception:
return set()