Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.52.0 (#45)
Browse files Browse the repository at this point in the history
- [ ] 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[bot] authored Sep 30, 2021
1 parent eca8481 commit b230f5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions google/cloud/service_usage_v1/services/service_usage/pagers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.service_usage_v1.types import resources
Expand Down Expand Up @@ -75,14 +75,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[serviceusage.ListServicesResponse]:
def pages(self) -> Iterator[serviceusage.ListServicesResponse]:
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[resources.Service]:
def __iter__(self) -> Iterator[resources.Service]:
for page in self.pages:
yield from page.services

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

@property
async def pages(self) -> AsyncIterable[serviceusage.ListServicesResponse]:
async def pages(self) -> AsyncIterator[serviceusage.ListServicesResponse]:
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[resources.Service]:
def __aiter__(self) -> AsyncIterator[resources.Service]:
async def async_generator():
async for page in self.pages:
for response in page.services:
Expand Down

0 comments on commit b230f5f

Please sign in to comment.