Skip to content

Commit 6246cba

Browse files
authored
Fixing the return type hint for the transaction method in the standalone client. (#3660)
* Fixing the return type hint for transaction method in standalone client * Changing Optional to explicitly adding None with Union - to improve clarity
1 parent c1c602d commit 6246cba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def pipeline(self, transaction=True, shard_hint=None) -> "Pipeline":
450450

451451
def transaction(
452452
self, func: Callable[["Pipeline"], None], *watches, **kwargs
453-
) -> None:
453+
) -> Union[List[Any], Any, None]:
454454
"""
455455
Convenience method for executing the callable `func` as a transaction
456456
while watching all keys specified in `watches`. The 'func' callable

0 commit comments

Comments
 (0)