Skip to content
Permalink
Browse files
chore: use gapic-generator-python 0.52.0 (#217)
- [ ] Regenerate this pull request now.

fix: improper types in pagers generation
PiperOrigin-RevId: 399773015

Source-Link: googleapis/googleapis@410c184

Source-Link: https://github.com/googleapis/googleapis-gen/commit/290e883545e3ac9ff2bd00cd0dacb28f1b8ca945
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjkwZTg4MzU0NWUzYWM5ZmYyYmQwMGNkMGRhY2IyOGYxYjhjYTk0NSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 30, 2021
1 parent a95fac8 commit fd5dd70ada7caf40d3dcd4b86e71e05820d5631f
Showing with 6 additions and 6 deletions.
  1. +6 −6 google/cloud/documentai_v1beta3/services/document_processor_service/pagers.py
@@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.documentai_v1beta3.types import document_processor_service
@@ -75,14 +75,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[document_processor_service.ListProcessorsResponse]:
def pages(self) -> Iterator[document_processor_service.ListProcessorsResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
self._response = self._method(self._request, metadata=self._metadata)
yield self._response

def __iter__(self) -> Iterable[processor.Processor]:
def __iter__(self) -> Iterator[processor.Processor]:
for page in self.pages:
yield from page.processors

@@ -141,14 +141,14 @@ def __getattr__(self, name: str) -> Any:
@property
async def pages(
self,
) -> AsyncIterable[document_processor_service.ListProcessorsResponse]:
) -> AsyncIterator[document_processor_service.ListProcessorsResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
self._response = await self._method(self._request, metadata=self._metadata)
yield self._response

def __aiter__(self) -> AsyncIterable[processor.Processor]:
def __aiter__(self) -> AsyncIterator[processor.Processor]:
async def async_generator():
async for page in self.pages:
for response in page.processors:

0 comments on commit fd5dd70

Please sign in to comment.