diff --git a/google/cloud/bigtable/data/_sync/cross_sync/cross_sync.py b/google/cloud/bigtable/data/_sync/cross_sync/cross_sync.py index 04ac79c73..1219c3b3d 100644 --- a/google/cloud/bigtable/data/_sync/cross_sync/cross_sync.py +++ b/google/cloud/bigtable/data/_sync/cross_sync/cross_sync.py @@ -105,6 +105,10 @@ class CrossSync(metaclass=MappingMeta): PytestFixture.decorator ) # decorate test methods to run with pytest fixture + @classmethod + def next(cls, iterable): + return iterable.__anext__() + @classmethod def Mock(cls, *args, **kwargs): """ @@ -230,7 +234,7 @@ def verify_async_event_loop() -> None: asyncio.get_running_loop() @staticmethod - def rm_aio(statement: Any) -> Any: + def rm_aio(statement: T) -> T: """ Used to annotate regions of the code containing async keywords to strip @@ -247,6 +251,7 @@ class _Sync_Impl(metaclass=MappingMeta): is_async = False sleep = time.sleep + next = next retry_target = retries.retry_target retry_target_stream = retries.retry_target_stream Retry = retries.Retry