Skip to content

Commit c853a52

Browse files
petyaslavovaManelCoutinhoSensei
authored andcommitted
Fixing the return type hint for the transaction method in the standalone client. (redis#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 3cea38b commit c853a52

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
@@ -453,7 +453,7 @@ def pipeline(self, transaction=True, shard_hint=None) -> "Pipeline":
453453

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

0 commit comments

Comments
 (0)