Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions yandexcloud/_sdk.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import inspect
from typing import TYPE_CHECKING, Any, Dict, Optional, Type, Union
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Type, TypeVar, Union

import grpc

from yandexcloud import _channels, _helpers, _operation_waiter, _retry_policy
from yandexcloud._wrappers import Wrappers

Client = TypeVar("Client")

if TYPE_CHECKING:
import logging

Expand Down Expand Up @@ -70,7 +72,7 @@ def __init__(

def client(
self,
stub_ctor: Type,
stub_ctor: Callable[[Any], Client],
interceptor: Union[
grpc.UnaryUnaryClientInterceptor,
grpc.UnaryStreamClientInterceptor,
Expand All @@ -80,7 +82,7 @@ def client(
] = None,
endpoint: Optional[str] = None,
insecure: bool = False,
) -> Any:
) -> Client:
service = _service_for_ctor(stub_ctor)
channel = self._channels.channel(service, endpoint, insecure)
if interceptor is not None:
Expand Down
Loading