2222Unused : TypeAlias = object
2323
2424
25- class AsyncRedisClient (Redis ): # type:ignore[type-arg]
25+ class AsyncRedisClient (Redis ):
2626 # Note - mypy throws error - Call to untyped function "execute_command" in typed context
2727 @override
2828 async def execute_command (self , * args : Any , ** options : Any ) -> Any :
@@ -37,7 +37,7 @@ async def execute_command(self, *args: Any, **options: Any) -> Any:
3737 raise CacheBackendInteractionError from e
3838
3939
40- class SentinelBlockingPool (SentinelConnectionPool ): # type:ignore[type-arg]
40+ class SentinelBlockingPool (SentinelConnectionPool ):
4141 """
4242 It performs the same function as the default
4343 `redis.asyncio.SentinelConnectionPool` implementation, in that,
@@ -58,22 +58,22 @@ class SentinelBlockingPool(SentinelConnectionPool): # type:ignore[type-arg]
5858
5959 def __init__ (self , service_name : str , sentinel_manager : Sentinel , ** kwargs : Any ) -> None :
6060 self .timeout = kwargs .pop ("timeout" , 20 )
61- super ().__init__ (service_name , sentinel_manager , ** kwargs )
61+ super ().__init__ (service_name , sentinel_manager , ** kwargs ) # type:ignore[no-untyped-call]
6262 self ._condition = asyncio .Condition ()
6363
64- async def get_connection (self , command_name : Unused , * keys : Unused , ** options : Unused ) -> _ConnectionT : # noqa: ARG002
64+ async def get_connection (self , command_name : Any = ... , * keys : Any , ** options : Any ) -> _ConnectionT : # noqa: ARG002
6565 """Gets a connection from the pool, blocking until one is available"""
6666 try :
6767 async with self ._condition : # noqa: SIM117
6868 async with async_timeout (self .timeout ):
69- await self ._condition .wait_for (self .can_get_connection ) # type:ignore[attr-defined]
70- connection = super ().get_available_connection () # type:ignore[misc ]
69+ await self ._condition .wait_for (self .can_get_connection )
70+ connection = super ().get_available_connection () # type:ignore[no-untyped-call ]
7171 except asyncio .TimeoutError as err :
7272 raise ConnectionError ("No connection available." ) from err # noqa: EM101, TRY003
7373
7474 # We now perform the connection check outside of the lock.
7575 try :
76- await self .ensure_connection (connection ) # type:ignore[attr-defined]
76+ await self .ensure_connection (connection )
7777 except BaseException :
7878 await self .release (connection )
7979 raise
0 commit comments