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

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: use gapic-generator-python 0.52.0 (#121)
- [ ] 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] committed Sep 30, 2021
1 parent afa6783 commit a73b1e0
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[accessapproval.ListApprovalRequestsResponse]:
def pages(self) -> Iterator[accessapproval.ListApprovalRequestsResponse]:
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[accessapproval.ApprovalRequest]:
def __iter__(self) -> Iterator[accessapproval.ApprovalRequest]:
for page in self.pages:
yield from page.approval_requests

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

@property
async def pages(self) -> AsyncIterable[accessapproval.ListApprovalRequestsResponse]:
async def pages(self) -> AsyncIterator[accessapproval.ListApprovalRequestsResponse]:
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[accessapproval.ApprovalRequest]:
def __aiter__(self) -> AsyncIterator[accessapproval.ApprovalRequest]:
async def async_generator():
async for page in self.pages:
for response in page.approval_requests:
Expand Down

0 comments on commit a73b1e0

Please sign in to comment.