Skip to content

Minor cleanups in commands/cluster.py #2094

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

Merged
merged 1 commit into from
Apr 28, 2022
Merged
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
7 changes: 3 additions & 4 deletions redis/commands/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ def replicaof(self, *args, **kwargs):

For more information see https://redis.io/commands/replicaof
"""
raise RedisClusterException("REPLICAOF is not supported in cluster" " mode")
raise RedisClusterException("REPLICAOF is not supported in cluster mode")

def swapdb(self, *args, **kwargs):
"""
Swaps two Redis databases.

For more information see https://redis.io/commands/swapdb
"""
raise RedisClusterException("SWAPDB is not supported in cluster" " mode")
raise RedisClusterException("SWAPDB is not supported in cluster mode")


class ClusterDataAccessCommands(DataAccessCommands):
Expand Down Expand Up @@ -310,7 +310,6 @@ class RedisClusterCommands(
target specific nodes. By default, if target_nodes is not specified, the
command will be executed on the default cluster node.


:param :target_nodes: type can be one of the followings:
- nodes flag: ALL_NODES, PRIMARIES, REPLICAS, RANDOM
- 'ClusterNode'
Expand All @@ -323,7 +322,7 @@ class RedisClusterCommands(

def cluster_myid(self, target_node):
"""
Returns the nodes id.
Returns the node's id.

:target_node: 'ClusterNode'
The node to execute the command on
Expand Down