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

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

Source-Link: googleapis/googleapis@410c184

Source-Link: googleapis/googleapis-gen@290e883
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjkwZTg4MzU0NWUzYWM5ZmYyYmQwMGNkMGRhY2IyOGYxYjhjYTk0NSJ9
  • Loading branch information
gcf-owl-bot committed Sep 30, 2021
1 parent 8bbeddb commit e82885ddcd9926e0b1a5c869e5843c534015b566
@@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[catalog_service.ListCatalogsResponse]:
def pages(self) -> Iterator[catalog_service.ListCatalogsResponse]:
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[catalog.Catalog]:
def __iter__(self) -> Iterator[catalog.Catalog]:
for page in self.pages:
yield from page.catalogs

@@ -137,14 +137,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
async def pages(self) -> AsyncIterable[catalog_service.ListCatalogsResponse]:
async def pages(self) -> AsyncIterator[catalog_service.ListCatalogsResponse]:
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[catalog.Catalog]:
def __aiter__(self) -> AsyncIterator[catalog.Catalog]:
async def async_generator():
async for page in self.pages:
for response in page.catalogs:
@@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[product_service.ListProductsResponse]:
def pages(self) -> Iterator[product_service.ListProductsResponse]:
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[product.Product]:
def __iter__(self) -> Iterator[product.Product]:
for page in self.pages:
yield from page.products

@@ -137,14 +137,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
async def pages(self) -> AsyncIterable[product_service.ListProductsResponse]:
async def pages(self) -> AsyncIterator[product_service.ListProductsResponse]:
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[product.Product]:
def __aiter__(self) -> AsyncIterator[product.Product]:
async def async_generator():
async for page in self.pages:
for response in page.products:
@@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[search_service.SearchResponse]:
def pages(self) -> Iterator[search_service.SearchResponse]:
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[search_service.SearchResponse.SearchResult]:
def __iter__(self) -> Iterator[search_service.SearchResponse.SearchResult]:
for page in self.pages:
yield from page.results

@@ -136,14 +136,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
async def pages(self) -> AsyncIterable[search_service.SearchResponse]:
async def pages(self) -> AsyncIterator[search_service.SearchResponse]:
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[search_service.SearchResponse.SearchResult]:
def __aiter__(self) -> AsyncIterator[search_service.SearchResponse.SearchResult]:
async def async_generator():
async for page in self.pages:
for response in page.results:

0 comments on commit e82885d

Please sign in to comment.