diff --git a/stubs/redis/redis/asyncio/client.pyi b/stubs/redis/redis/asyncio/client.pyi index 68cc3bb2b..6154780c3 100644 --- a/stubs/redis/redis/asyncio/client.pyi +++ b/stubs/redis/redis/asyncio/client.pyi @@ -116,7 +116,7 @@ class Monitor: connection: Any def __init__(self, connection_pool: ConnectionPool) -> None: ... async def connect(self) -> None: ... - async def __aenter__(self): ... + async def __aenter__(self: Self) -> Self: ... async def __aexit__(self, *args) -> None: ... async def next_command(self) -> MonitorCommandInfo: ... def listen(self) -> AsyncIterator[MonitorCommandInfo]: ... @@ -142,7 +142,7 @@ class PubSub: ignore_subscribe_messages: bool = ..., encoder: Incomplete | None = ..., ) -> None: ... - async def __aenter__(self): ... + async def __aenter__(self: Self) -> Self: ... async def __aexit__(self, exc_type, exc_value, traceback) -> None: ... def __del__(self) -> None: ... async def reset(self) -> None: ...