Skip to content

Commit

Permalink
Fix inaccurate docstring for unwatch() (#3424)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
djroze authored Feb 18, 2025
1 parent 60f24a9 commit 05e3094
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ def watch(self, *names: KeyT) -> None:

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

0 comments on commit 05e3094

Please sign in to comment.