mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 21:31:09 +08:00
Fixes redis.asyncio.client: AsyncIterator cannot be async def in stubs. (#8961)
Without the `yield` statement in the method body, these are interpreted by mypy as coroutines that return an `AsyncIterator`. Closes #8960
This commit is contained in:
@@ -116,7 +116,7 @@ class Monitor:
|
||||
async def __aenter__(self): ...
|
||||
async def __aexit__(self, *args) -> None: ...
|
||||
async def next_command(self) -> MonitorCommandInfo: ...
|
||||
async def listen(self) -> AsyncIterator[MonitorCommandInfo]: ...
|
||||
def listen(self) -> AsyncIterator[MonitorCommandInfo]: ...
|
||||
|
||||
class PubSub:
|
||||
PUBLISH_MESSAGE_TYPES: ClassVar[tuple[str, ...]]
|
||||
@@ -154,7 +154,7 @@ class PubSub:
|
||||
def punsubscribe(self, *args: ChannelT) -> Awaitable[Any]: ...
|
||||
async def subscribe(self, *args: ChannelT, **kwargs: Callable[..., Any]): ...
|
||||
def unsubscribe(self, *args) -> Awaitable[Any]: ...
|
||||
async def listen(self) -> AsyncIterator[Any]: ...
|
||||
def listen(self) -> AsyncIterator[Any]: ...
|
||||
async def get_message(self, ignore_subscribe_messages: bool = ..., timeout: float = ...): ...
|
||||
def ping(self, message: Any | None = ...) -> Awaitable[Any]: ...
|
||||
async def handle_message(self, response, ignore_subscribe_messages: bool = ...): ...
|
||||
|
||||
Reference in New Issue
Block a user