Skip to content

Commit 1e5ce86

Browse files
committed
fix linters
1 parent 2442063 commit 1e5ce86

File tree

2 files changed

+291
-291
lines changed

2 files changed

+291
-291
lines changed

redis/commands/cluster.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def mget_nonatomic(self, keys, *args):
4242
4343
Returns a list of values ordered identically to ``keys``
4444
45-
For more information check https://redis.io/commands/mget
45+
For more information see https://redis.io/commands/mget
4646
"""
4747

4848
from redis.client import EMPTY_RESPONSE
@@ -80,7 +80,7 @@ def mset_nonatomic(self, mapping):
8080
for the keys of every slot. This operation will not be atomic
8181
if keys belong to more than one slot.
8282
83-
For more information check https://redis.io/commands/mset
83+
For more information see https://redis.io/commands/mset
8484
"""
8585

8686
# Partition the keys by slot
@@ -120,7 +120,7 @@ def exists(self, *keys):
120120
whole cluster. The keys are first split up into slots
121121
and then an EXISTS command is sent for every slot
122122
123-
For more information check https://redis.io/commands/exists
123+
For more information see https://redis.io/commands/exists
124124
"""
125125
return self._split_command_across_slots("EXISTS", *keys)
126126

@@ -133,7 +133,7 @@ def delete(self, *keys):
133133
Non-existant keys are ignored.
134134
Returns the number of keys that were deleted.
135135
136-
For more information check https://redis.io/commands/del
136+
For more information see https://redis.io/commands/del
137137
"""
138138
return self._split_command_across_slots("DEL", *keys)
139139

@@ -148,7 +148,7 @@ def touch(self, *keys):
148148
Non-existant keys are ignored.
149149
Returns the number of keys that were touched.
150150
151-
For more information check https://redis.io/commands/touch
151+
For more information see https://redis.io/commands/touch
152152
"""
153153
return self._split_command_across_slots("TOUCH", *keys)
154154

@@ -162,7 +162,7 @@ def unlink(self, *keys):
162162
Non-existant keys are ignored.
163163
Returns the number of keys that were unlinked.
164164
165-
For more information check https://redis.io/commands/unlink
165+
For more information see https://redis.io/commands/unlink
166166
"""
167167
return self._split_command_across_slots("UNLINK", *keys)
168168

@@ -179,23 +179,23 @@ def slaveof(self, *args, **kwargs):
179179
"""
180180
Make the server a replica of another instance, or promote it as master.
181181
182-
For more information check https://redis.io/commands/slaveof
182+
For more information see https://redis.io/commands/slaveof
183183
"""
184184
raise RedisClusterException("SLAVEOF is not supported in cluster mode")
185185

186186
def replicaof(self, *args, **kwargs):
187187
"""
188188
Make the server a replica of another instance, or promote it as master.
189189
190-
For more information check https://redis.io/commands/replicaof
190+
For more information see https://redis.io/commands/replicaof
191191
"""
192192
raise RedisClusterException("REPLICAOF is not supported in cluster" " mode")
193193

194194
def swapdb(self, *args, **kwargs):
195195
"""
196196
Swaps two Redis databases.
197197
198-
For more information check https://redis.io/commands/swapdb
198+
For more information see https://redis.io/commands/swapdb
199199
"""
200200
raise RedisClusterException("SWAPDB is not supported in cluster" " mode")
201201

@@ -237,7 +237,7 @@ def stralgo(
237237
``withmatchlen`` Returns the matches with the len of the match.
238238
Can be provided only when ``idx`` set to True.
239239
240-
For more information check https://redis.io/commands/stralgo
240+
For more information see https://redis.io/commands/stralgo
241241
"""
242242
target_nodes = kwargs.pop("target_nodes", None)
243243
if specific_argument == "strings" and target_nodes is None:
@@ -328,7 +328,7 @@ def cluster_addslots(self, target_node, *slots):
328328
:target_node: 'ClusterNode'
329329
The node to execute the command on
330330
331-
For more information check https://redis.io/commands/cluster-addslots
331+
For more information see https://redis.io/commands/cluster-addslots
332332
"""
333333
return self.execute_command(
334334
"CLUSTER ADDSLOTS", *slots, target_nodes=target_node
@@ -344,7 +344,7 @@ def cluster_addslotsrange(self, target_node, *slots):
344344
:target_node: 'ClusterNode'
345345
The node to execute the command on
346346
347-
For more information check https://redis.io/commands/cluster-addslotsrange
347+
For more information see https://redis.io/commands/cluster-addslotsrange
348348
"""
349349
return self.execute_command(
350350
"CLUSTER ADDSLOTSRANGE", *slots, target_nodes=target_node
@@ -355,7 +355,7 @@ def cluster_countkeysinslot(self, slot_id):
355355
Return the number of local keys in the specified hash slot
356356
Send to node based on specified slot_id
357357
358-
For more information check https://redis.io/commands/cluster-countkeysinslot
358+
For more information see https://redis.io/commands/cluster-countkeysinslot
359359
"""
360360
return self.execute_command("CLUSTER COUNTKEYSINSLOT", slot_id)
361361

@@ -364,7 +364,7 @@ def cluster_count_failure_report(self, node_id):
364364
Return the number of failure reports active for a given node
365365
Sends to a random node
366366
367-
For more information check https://redis.io/commands/cluster-count-failure-reports
367+
For more information see https://redis.io/commands/cluster-count-failure-reports
368368
"""
369369
return self.execute_command("CLUSTER COUNT-FAILURE-REPORTS", node_id)
370370

@@ -375,7 +375,7 @@ def cluster_delslots(self, *slots):
375375
376376
Returns a list of the results for each processed slot.
377377
378-
For more information check https://redis.io/commands/cluster-delslots
378+
For more information see https://redis.io/commands/cluster-delslots
379379
"""
380380
return [self.execute_command("CLUSTER DELSLOTS", slot) for slot in slots]
381381

@@ -386,7 +386,7 @@ def cluster_delslotsrange(self, *slots):
386386
from the node, while CLUSTER DELSLOTSRANGE takes a list of slot ranges to remove
387387
from the node.
388388
389-
For more information check https://redis.io/commands/cluster-delslotsrange
389+
For more information see https://redis.io/commands/cluster-delslotsrange
390390
"""
391391
return self.execute_command("CLUSTER DELSLOTSRANGE", *slots)
392392

@@ -398,7 +398,7 @@ def cluster_failover(self, target_node, option=None):
398398
:target_node: 'ClusterNode'
399399
The node to execute the command on
400400
401-
For more information check https://redis.io/commands/cluster-failover
401+
For more information see https://redis.io/commands/cluster-failover
402402
"""
403403
if option:
404404
if option.upper() not in ["FORCE", "TAKEOVER"]:
@@ -418,7 +418,7 @@ def cluster_info(self, target_nodes=None):
418418
The command will be sent to a random node in the cluster if no target
419419
node is specified.
420420
421-
For more information check https://redis.io/commands/cluster-info
421+
For more information see https://redis.io/commands/cluster-info
422422
"""
423423
return self.execute_command("CLUSTER INFO", target_nodes=target_nodes)
424424

@@ -427,7 +427,7 @@ def cluster_keyslot(self, key):
427427
Returns the hash slot of the specified key
428428
Sends to random node in the cluster
429429
430-
For more information check https://redis.io/commands/cluster-keyslot
430+
For more information see https://redis.io/commands/cluster-keyslot
431431
"""
432432
return self.execute_command("CLUSTER KEYSLOT", key)
433433

@@ -436,7 +436,7 @@ def cluster_meet(self, host, port, target_nodes=None):
436436
Force a node cluster to handshake with another node.
437437
Sends to specified node.
438438
439-
For more information check https://redis.io/commands/cluster-meet
439+
For more information see https://redis.io/commands/cluster-meet
440440
"""
441441
return self.execute_command(
442442
"CLUSTER MEET", host, port, target_nodes=target_nodes
@@ -447,15 +447,15 @@ def cluster_nodes(self):
447447
Get Cluster config for the node.
448448
Sends to random node in the cluster
449449
450-
For more information check https://redis.io/commands/cluster-nodes
450+
For more information see https://redis.io/commands/cluster-nodes
451451
"""
452452
return self.execute_command("CLUSTER NODES")
453453

454454
def cluster_replicate(self, target_nodes, node_id):
455455
"""
456456
Reconfigure a node as a slave of the specified master node
457457
458-
For more information check https://redis.io/commands/cluster-replicate
458+
For more information see https://redis.io/commands/cluster-replicate
459459
"""
460460
return self.execute_command(
461461
"CLUSTER REPLICATE", node_id, target_nodes=target_nodes
@@ -468,7 +468,7 @@ def cluster_reset(self, soft=True, target_nodes=None):
468468
If 'soft' is True then it will send 'SOFT' argument
469469
If 'soft' is False then it will send 'HARD' argument
470470
471-
For more information check https://redis.io/commands/cluster-reset
471+
For more information see https://redis.io/commands/cluster-reset
472472
"""
473473
return self.execute_command(
474474
"CLUSTER RESET", b"SOFT" if soft else b"HARD", target_nodes=target_nodes
@@ -478,23 +478,23 @@ def cluster_save_config(self, target_nodes=None):
478478
"""
479479
Forces the node to save cluster state on disk
480480
481-
For more information check https://redis.io/commands/cluster-saveconfig
481+
For more information see https://redis.io/commands/cluster-saveconfig
482482
"""
483483
return self.execute_command("CLUSTER SAVECONFIG", target_nodes=target_nodes)
484484

485485
def cluster_get_keys_in_slot(self, slot, num_keys):
486486
"""
487487
Returns the number of keys in the specified cluster slot
488488
489-
For more information check https://redis.io/commands/cluster-getkeysinslot
489+
For more information see https://redis.io/commands/cluster-getkeysinslot
490490
"""
491491
return self.execute_command("CLUSTER GETKEYSINSLOT", slot, num_keys)
492492

493493
def cluster_set_config_epoch(self, epoch, target_nodes=None):
494494
"""
495495
Set the configuration epoch in a new node
496496
497-
For more information check https://redis.io/commands/cluster-set-config-epoch
497+
For more information see https://redis.io/commands/cluster-set-config-epoch
498498
"""
499499
return self.execute_command(
500500
"CLUSTER SET-CONFIG-EPOCH", epoch, target_nodes=target_nodes
@@ -507,7 +507,7 @@ def cluster_setslot(self, target_node, node_id, slot_id, state):
507507
:target_node: 'ClusterNode'
508508
The node to execute the command on
509509
510-
For more information check https://redis.io/commands/cluster-setslot
510+
For more information see https://redis.io/commands/cluster-setslot
511511
"""
512512
if state.upper() in ("IMPORTING", "NODE", "MIGRATING"):
513513
return self.execute_command(
@@ -523,7 +523,7 @@ def cluster_setslot_stable(self, slot_id):
523523
Clears migrating / importing state from the slot.
524524
It determines by it self what node the slot is in and sends it there.
525525
526-
For more information check https://redis.io/commands/cluster-setslot
526+
For more information see https://redis.io/commands/cluster-setslot
527527
"""
528528
return self.execute_command("CLUSTER SETSLOT", slot_id, "STABLE")
529529

@@ -532,7 +532,7 @@ def cluster_replicas(self, node_id, target_nodes=None):
532532
Provides a list of replica nodes replicating from the specified primary
533533
target node.
534534
535-
For more information check https://redis.io/commands/cluster-replicas
535+
For more information see https://redis.io/commands/cluster-replicas
536536
"""
537537
return self.execute_command(
538538
"CLUSTER REPLICAS", node_id, target_nodes=target_nodes
@@ -542,7 +542,7 @@ def cluster_slots(self, target_nodes=None):
542542
"""
543543
Get array of Cluster slot to node mappings
544544
545-
For more information check https://redis.io/commands/cluster-slots
545+
For more information see https://redis.io/commands/cluster-slots
546546
"""
547547
return self.execute_command("CLUSTER SLOTS", target_nodes=target_nodes)
548548

@@ -554,7 +554,7 @@ def cluster_links(self, target_node):
554554
555555
This command outputs information of all such peer links as an array.
556556
557-
For more information check https://redis.io/commands/cluster-links
557+
For more information see https://redis.io/commands/cluster-links
558558
"""
559559
return self.execute_command("CLUSTER LINKS", target_nodes=target_node)
560560

@@ -564,7 +564,7 @@ def readonly(self, target_nodes=None):
564564
The command will be sent to the default cluster node if target_nodes is
565565
not specified.
566566
567-
For more information check https://redis.io/commands/readonly
567+
For more information see https://redis.io/commands/readonly
568568
"""
569569
if target_nodes == "replicas" or target_nodes == "all":
570570
# read_from_replicas will only be enabled if the READONLY command
@@ -578,7 +578,7 @@ def readwrite(self, target_nodes=None):
578578
The command will be sent to the default cluster node if target_nodes is
579579
not specified.
580580
581-
For more information check https://redis.io/commands/readwrite
581+
For more information see https://redis.io/commands/readwrite
582582
"""
583583
# Reset read from replicas flag
584584
self.read_from_replicas = False

0 commit comments

Comments
 (0)