summaryrefslogtreecommitdiff
path: root/redis/commands/helpers.py
diff options
context:
space:
mode:
authorUtkarsh Gupta <utkarshgupta137@gmail.com>2022-06-27 16:10:36 +0530
committerGitHub <noreply@github.com>2022-06-27 13:40:36 +0300
commitd7d433641f3d1ea0dca2794aef064a7d3e28514e (patch)
tree944bb6f738fbe17a94162cfc1fae509c5dceedf8 /redis/commands/helpers.py
parent11cf66afc9b764248f12761138cc28a2b3e1366c (diff)
downloadredis-py-d7d433641f3d1ea0dca2794aef064a7d3e28514e.tar.gz
commands/cluster: use pipeline to execute split commands (#2230)
- allow passing target_nodes to pipeline commands - move READ_COMMANDS to commands/cluster to avoid import cycle - add types to list_or_args
Diffstat (limited to 'redis/commands/helpers.py')
-rw-r--r--redis/commands/helpers.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/redis/commands/helpers.py b/redis/commands/helpers.py
index 2b873e3..6989ab5 100644
--- a/redis/commands/helpers.py
+++ b/redis/commands/helpers.py
@@ -1,9 +1,12 @@
import copy
import random
import string
+from typing import List, Tuple
+from redis.typing import KeysT, KeyT
-def list_or_args(keys, args):
+
+def list_or_args(keys: KeysT, args: Tuple[KeyT, ...]) -> List[KeyT]:
# returns a single new list combining keys and args
try:
iter(keys)