Skip to content

Commit e203c2b

Browse files
authored
grpc _CallIterator is an iterator (#13925)
1 parent 61b54b4 commit e203c2b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

stubs/grpcio/@tests/test_cases/check_grpc.py

+1
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@
4444
call_iter = cast(grpc._CallIterator[str], None)
4545
for call in call_iter:
4646
assert_type(call, str)
47+
assert_type(next(call_iter), str)

stubs/grpcio/grpc/__init__.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ class UnaryUnaryClientInterceptor(abc.ABC, Generic[_TRequest, _TResponse]):
426426
@type_check_only
427427
class _CallIterator(Call, Generic[_TResponse], metaclass=abc.ABCMeta):
428428
def __iter__(self) -> Iterator[_TResponse]: ...
429+
def __next__(self) -> _TResponse: ...
429430

430431
class UnaryStreamClientInterceptor(abc.ABC, Generic[_TRequest, _TResponse]):
431432
@abc.abstractmethod

0 commit comments

Comments
 (0)