Fix basedpyright type errors (#25435)

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
-LAN-
2025-09-10 01:54:26 +08:00
committed by GitHub
parent 2ac7a9c8fc
commit 08dd3f7b50
100 changed files with 847 additions and 497 deletions

View File

@@ -23,13 +23,13 @@ DEFAULT_QUEUE_READ_TIMEOUT = 3
@final
class _StatusReady:
def __init__(self, endpoint_url: str):
self._endpoint_url = endpoint_url
self.endpoint_url = endpoint_url
@final
class _StatusError:
def __init__(self, exc: Exception):
self._exc = exc
self.exc = exc
# Type aliases for better readability
@@ -211,9 +211,9 @@ class SSETransport:
raise ValueError("failed to get endpoint URL")
if isinstance(status, _StatusReady):
return status._endpoint_url
return status.endpoint_url
elif isinstance(status, _StatusError):
raise status._exc
raise status.exc
else:
raise ValueError("failed to get endpoint URL")