diff --git a/redis/asyncio/client.py b/redis/asyncio/client.py index 9478d539d7..7c17938714 100644 --- a/redis/asyncio/client.py +++ b/redis/asyncio/client.py @@ -1554,7 +1554,7 @@ async def _disconnect_raise_reset(self, conn: Connection, error: Exception): await self.reset() raise - async def execute(self, raise_on_error: bool = True): + async def execute(self, raise_on_error: bool = True) -> List[Any]: """Execute all the commands in the current pipeline""" stack = self.command_stack if not stack and not self.watching: diff --git a/redis/client.py b/redis/client.py index 4fa410c65e..88bc6bf475 100755 --- a/redis/client.py +++ b/redis/client.py @@ -1554,7 +1554,7 @@ def _disconnect_raise_reset( self.reset() raise error - def execute(self, raise_on_error=True): + def execute(self, raise_on_error: bool = True) -> List[Any]: """Execute all the commands in the current pipeline""" stack = self.command_stack if not stack and not self.watching: diff --git a/redis/cluster.py b/redis/cluster.py index 2fff761f95..6c6cfbf114 100644 --- a/redis/cluster.py +++ b/redis/cluster.py @@ -2050,7 +2050,7 @@ def annotate_exception(self, exception, number, command): ) exception.args = (msg,) + exception.args[1:] - def execute(self, raise_on_error=True): + def execute(self, raise_on_error: bool = True) -> List[Any]: """ Execute all the commands in the current pipeline """