mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 13:51:30 +08:00
Use proper return types for __await__ methods in redis.asyncio.client (#10379)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections.abc import AsyncIterator, Awaitable, Callable, Iterable, Mapping, MutableMapping, Sequence
|
||||
from collections.abc import AsyncIterator, Awaitable, Callable, Generator, Iterable, Mapping, MutableMapping, Sequence
|
||||
from datetime import datetime, timedelta
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar, Generic, NoReturn, Protocol, overload
|
||||
@@ -67,7 +67,7 @@ class Redis(AbstractRedis, RedisModuleCommands, AsyncCoreCommands[_StrType], Asy
|
||||
redis_connect_func: ConnectCallbackT | None = None,
|
||||
credential_provider: CredentialProvider | None = None,
|
||||
) -> None: ...
|
||||
def __await__(self): ...
|
||||
def __await__(self) -> Generator[Any, None, Self]: ...
|
||||
async def initialize(self) -> Self: ...
|
||||
def set_response_callback(self, command: str, callback: ResponseCallbackT): ...
|
||||
def load_external_module(self, funcname, func) -> None: ...
|
||||
@@ -200,7 +200,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
|
||||
async def __aexit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def __await__(self): ...
|
||||
def __await__(self) -> Generator[Any, None, Self]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
async def reset(self) -> None: ... # type: ignore[override]
|
||||
|
||||
Reference in New Issue
Block a user