From 7f46aa3475bc2f93c037d101ed8a1496aed0d444 Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Wed, 8 Nov 2023 01:30:46 -0500 Subject: [PATCH] fix(stubs): update initialisation types (#577) Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> --- openllm-client/src/openllm_client/__init__.pyi | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/openllm-client/src/openllm_client/__init__.pyi b/openllm-client/src/openllm_client/__init__.pyi index 7f87f48b..a03dcad3 100644 --- a/openllm-client/src/openllm_client/__init__.pyi +++ b/openllm-client/src/openllm_client/__init__.pyi @@ -5,6 +5,7 @@ from typing import Iterator from typing import List from typing import Optional from typing import Union +from typing import overload import attr as _attr @@ -17,7 +18,12 @@ class HTTPClient: client_args: Dict[str, Any] @staticmethod def wait_until_server_ready(addr: str, timeout: float = ..., verify: bool = ..., check_interval: int = ..., **client_args: Any) -> None: ... - def __init__(self, address: Optional[str] = ..., timeout: int = ..., verify: bool = ..., api_version: str = ..., **client_args: Any) -> None: ... + @overload + def __init__(self, address: str, timeout: int = ..., verify: bool = ..., api_version: str = ..., **client_args: Any) -> None: ... + @overload + def __init__(self, address: str = ..., timeout: int = ..., verify: bool = ..., api_version: str = ..., **client_args: Any) -> None: ... + @overload + def __init__(self, address: None = ..., timeout: int = ..., verify: bool = ..., api_version: str = ..., **client_args: Any) -> None: ... @property def is_ready(self) -> bool: ... def health(self) -> None: ... @@ -49,7 +55,12 @@ class AsyncHTTPClient: client_args: Dict[str, Any] @staticmethod async def wait_until_server_ready(addr: str, timeout: float = ..., verify: bool = ..., check_interval: int = ..., **client_args: Any) -> None: ... - def __init__(self, address: Optional[str] = ..., timeout: int = ..., verify: bool = ..., api_version: str = ..., **client_args: Any) -> None: ... + @overload + def __init__(self, address: str, timeout: int = ..., verify: bool = ..., api_version: str = ..., **client_args: Any) -> None: ... + @overload + def __init__(self, address: str = ..., timeout: int = ..., verify: bool = ..., api_version: str = ..., **client_args: Any) -> None: ... + @overload + def __init__(self, address: None = ..., timeout: int = ..., verify: bool = ..., api_version: str = ..., **client_args: Any) -> None: ... @property def is_ready(self) -> bool: ... async def health(self) -> None: ...