Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: use gapic-generator-python 0.52.0 (#510)
- [ ] 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 712d222 commit 2ad639d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
28 changes: 14 additions & 14 deletions google/pubsub_v1/services/publisher/pagers.py
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[pubsub.ListTopicsResponse]:
def pages(self) -> Iterator[pubsub.ListTopicsResponse]:
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[pubsub.Topic]:
def __iter__(self) -> Iterator[pubsub.Topic]:
for page in self.pages:
yield from page.topics

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[pubsub.ListTopicsResponse]:
async def pages(self) -> AsyncIterator[pubsub.ListTopicsResponse]:
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[pubsub.Topic]:
def __aiter__(self) -> AsyncIterator[pubsub.Topic]:
async def async_generator():
async for page in self.pages:
for response in page.topics:
Expand Down Expand Up @@ -202,14 +202,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[pubsub.ListTopicSubscriptionsResponse]:
def pages(self) -> Iterator[pubsub.ListTopicSubscriptionsResponse]:
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[str]:
def __iter__(self) -> Iterator[str]:
for page in self.pages:
yield from page.subscriptions

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

@property
async def pages(self) -> AsyncIterable[pubsub.ListTopicSubscriptionsResponse]:
async def pages(self) -> AsyncIterator[pubsub.ListTopicSubscriptionsResponse]:
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[str]:
def __aiter__(self) -> AsyncIterator[str]:
async def async_generator():
async for page in self.pages:
for response in page.subscriptions:
Expand Down Expand Up @@ -330,14 +330,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[pubsub.ListTopicSnapshotsResponse]:
def pages(self) -> Iterator[pubsub.ListTopicSnapshotsResponse]:
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[str]:
def __iter__(self) -> Iterator[str]:
for page in self.pages:
yield from page.snapshots

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

@property
async def pages(self) -> AsyncIterable[pubsub.ListTopicSnapshotsResponse]:
async def pages(self) -> AsyncIterator[pubsub.ListTopicSnapshotsResponse]:
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[str]:
def __aiter__(self) -> AsyncIterator[str]:
async def async_generator():
async for page in self.pages:
for response in page.snapshots:
Expand Down
12 changes: 6 additions & 6 deletions google/pubsub_v1/services/schema_service/pagers.py
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[schema.ListSchemasResponse]:
def pages(self) -> Iterator[schema.ListSchemasResponse]:
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[schema.Schema]:
def __iter__(self) -> Iterator[schema.Schema]:
for page in self.pages:
yield from page.schemas

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[schema.ListSchemasResponse]:
async def pages(self) -> AsyncIterator[schema.ListSchemasResponse]:
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[schema.Schema]:
def __aiter__(self) -> AsyncIterator[schema.Schema]:
async def async_generator():
async for page in self.pages:
for response in page.schemas:
Expand Down
20 changes: 10 additions & 10 deletions google/pubsub_v1/services/subscriber/pagers.py
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[pubsub.ListSubscriptionsResponse]:
def pages(self) -> Iterator[pubsub.ListSubscriptionsResponse]:
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[pubsub.Subscription]:
def __iter__(self) -> Iterator[pubsub.Subscription]:
for page in self.pages:
yield from page.subscriptions

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[pubsub.ListSubscriptionsResponse]:
async def pages(self) -> AsyncIterator[pubsub.ListSubscriptionsResponse]:
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[pubsub.Subscription]:
def __aiter__(self) -> AsyncIterator[pubsub.Subscription]:
async def async_generator():
async for page in self.pages:
for response in page.subscriptions:
Expand Down Expand Up @@ -202,14 +202,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[pubsub.ListSnapshotsResponse]:
def pages(self) -> Iterator[pubsub.ListSnapshotsResponse]:
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[pubsub.Snapshot]:
def __iter__(self) -> Iterator[pubsub.Snapshot]:
for page in self.pages:
yield from page.snapshots

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

@property
async def pages(self) -> AsyncIterable[pubsub.ListSnapshotsResponse]:
async def pages(self) -> AsyncIterator[pubsub.ListSnapshotsResponse]:
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[pubsub.Snapshot]:
def __aiter__(self) -> AsyncIterator[pubsub.Snapshot]:
async def async_generator():
async for page in self.pages:
for response in page.snapshots:
Expand Down

0 comments on commit 2ad639d

Please sign in to comment.