Skip to content

Commit 5342409

Browse files
Add types to execute method of pipelines (#3494)
Co-authored-by: Vladyslav Vildanov <[email protected]>
1 parent d989bcc commit 5342409

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

redis/asyncio/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ async def _disconnect_raise_reset(self, conn: Connection, error: Exception):
15541554
await self.reset()
15551555
raise
15561556

1557-
async def execute(self, raise_on_error: bool = True):
1557+
async def execute(self, raise_on_error: bool = True) -> List[Any]:
15581558
"""Execute all the commands in the current pipeline"""
15591559
stack = self.command_stack
15601560
if not stack and not self.watching:

redis/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ def _disconnect_raise_reset(
15541554
self.reset()
15551555
raise error
15561556

1557-
def execute(self, raise_on_error=True):
1557+
def execute(self, raise_on_error: bool = True) -> List[Any]:
15581558
"""Execute all the commands in the current pipeline"""
15591559
stack = self.command_stack
15601560
if not stack and not self.watching:

redis/cluster.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2050,7 +2050,7 @@ def annotate_exception(self, exception, number, command):
20502050
)
20512051
exception.args = (msg,) + exception.args[1:]
20522052

2053-
def execute(self, raise_on_error=True):
2053+
def execute(self, raise_on_error: bool = True) -> List[Any]:
20542054
"""
20552055
Execute all the commands in the current pipeline
20562056
"""

0 commit comments

Comments
 (0)