Skip to content

Commit 05e3094

Browse files
authoredFeb 18, 2025
Fix inaccurate docstring for unwatch() (#3424)
The 'unwatch()' method of the Redis client, as currently documented, says that it unwatches the value at key "name", but it does not actually take any arguments ("name" or otherwise). According to the latest Redis documentation at the given URL for the UNWATCH command, this command unwatches all previously watched keys for the current transaction. Modified docstring to reflect that this method does not take any arguments and instead (presumably) unwatches all previously watched keys.
1 parent 60f24a9 commit 05e3094

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎redis/commands/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2496,7 +2496,7 @@ def watch(self, *names: KeyT) -> None:
24962496

24972497
def unwatch(self) -> None:
24982498
"""
2499-
Unwatches the value at key ``name``, or None of the key doesn't exist
2499+
Unwatches all previously watched keys for a transaction
25002500
25012501
For more information see https://redis.io/commands/unwatch
25022502
"""

0 commit comments

Comments
 (0)