grpc _CallIterator is an iterator (#13925)

This commit is contained in:
Micah Denbraver
2025-05-05 06:45:25 -07:00
committed by GitHub
parent 61b54b4eaa
commit e203c2ba38
2 changed files with 2 additions and 0 deletions
@@ -44,3 +44,4 @@ assert_type(call_details.timeout, Optional[float])
call_iter = cast(grpc._CallIterator[str], None)
for call in call_iter:
assert_type(call, str)
assert_type(next(call_iter), str)
+1
View File
@@ -426,6 +426,7 @@ class UnaryUnaryClientInterceptor(abc.ABC, Generic[_TRequest, _TResponse]):
@type_check_only
class _CallIterator(Call, Generic[_TResponse], metaclass=abc.ABCMeta):
def __iter__(self) -> Iterator[_TResponse]: ...
def __next__(self) -> _TResponse: ...
class UnaryStreamClientInterceptor(abc.ABC, Generic[_TRequest, _TResponse]):
@abc.abstractmethod