Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types to execute method of pipelines #3494

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion redis/asyncio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion redis/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
Loading