@@ -888,7 +888,7 @@ def determine_slot(self, *args):
888
888
if len (args ) <= 2 :
889
889
raise RedisClusterException (f"Invalid args in command: { args } " )
890
890
num_actual_keys = args [2 ]
891
- eval_keys = args [3 : 3 + num_actual_keys ]
891
+ eval_keys = args [3 : 3 + num_actual_keys ]
892
892
# if there are 0 keys, that means the script can be run on any node
893
893
# so we can just return a random slot
894
894
if len (eval_keys ) == 0 :
@@ -1908,14 +1908,16 @@ def _send_cluster_commands(
1908
1908
target_nodes = self ._parse_target_nodes (passed_targets )
1909
1909
else :
1910
1910
target_nodes = self ._determine_nodes (
1911
- * c .args , node_flag = passed_targets )
1911
+ * c .args , node_flag = passed_targets
1912
+ )
1912
1913
if not target_nodes :
1913
1914
raise RedisClusterException (
1914
1915
f"No targets were found to execute { c .args } command on"
1915
1916
)
1916
1917
if len (target_nodes ) > 1 :
1917
1918
raise RedisClusterException (
1918
- f"Too many targets for command { c .args } " )
1919
+ f"Too many targets for command { c .args } "
1920
+ )
1919
1921
1920
1922
node = target_nodes [0 ]
1921
1923
@@ -1938,7 +1940,7 @@ def _send_cluster_commands(
1938
1940
nodes [node_name ] = NodeCommands (
1939
1941
redis_node .parse_response ,
1940
1942
redis_node .connection_pool ,
1941
- connection
1943
+ connection ,
1942
1944
)
1943
1945
nodes [node_name ].append (c )
1944
1946
break
0 commit comments