Skip to content

Commit b49168d

Browse files
committed
Fixed linters
1 parent 2a8bc6f commit b49168d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

redis/asyncio/cluster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ async def _execute_command(
707707
return await target_node.execute_command(*args, **kwargs)
708708
except (BusyLoadingError, MaxConnectionsError):
709709
raise
710-
except (ConnectionError, TimeoutError) as e:
710+
except (ConnectionError, TimeoutError):
711711
# Connection retries are being handled in the node's
712712
# Retry object.
713713
# Remove the failed node from the startup nodes before we try
@@ -1163,8 +1163,8 @@ async def initialize(self) -> None:
11631163

11641164
if not startup_nodes_reachable:
11651165
raise RedisClusterException(
1166-
f"Redis Cluster cannot be connected. Please provide at least "
1167-
f"one reachable node"
1166+
"Redis Cluster cannot be connected. Please provide at least "
1167+
"one reachable node"
11681168
) from exception
11691169

11701170
# Check if the slots are not fully covered

redis/cluster.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import copy
21
import random
32
import socket
43
import sys
@@ -474,8 +473,9 @@ def __init__(
474473
If you use dynamic DNS endpoints for startup nodes but CLUSTER SLOTS lists
475474
specific IP addresses, it is best to set it to false.
476475
:param cluster_error_retry_attempts:
477-
Number of times to retry before raising an error when :class:`~.TimeoutError`
478-
or :class:`~.ConnectionError` or :class:`~.ClusterDownError` are encountered
476+
Number of times to retry before raising an error when
477+
:class:`~.TimeoutError` or :class:`~.ConnectionError` or
478+
:class:`~.ClusterDownError` are encountered
479479
:param connection_error_retry_attempts:
480480
Number of times to retry before reinitializing when :class:`~.TimeoutError`
481481
or :class:`~.ConnectionError` are encountered.
@@ -1510,8 +1510,8 @@ def initialize(self):
15101510

15111511
if not startup_nodes_reachable:
15121512
raise RedisClusterException(
1513-
f"Redis Cluster cannot be connected. Please provide at least "
1514-
f"one reachable node"
1513+
"Redis Cluster cannot be connected. Please provide at least "
1514+
"one reachable node"
15151515
) from exception
15161516

15171517
# Create Redis connections to all nodes

tests/test_asyncio/test_cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from redis.asyncio.connection import Connection, SSLConnection
1515
from redis.asyncio.parser import CommandsParser
1616
from redis.asyncio.retry import Retry
17-
from redis.backoff import get_default_backoff, ExponentialBackoff, NoBackoff
17+
from redis.backoff import ExponentialBackoff, NoBackoff, get_default_backoff
1818
from redis.cluster import PIPELINE_BLOCKED_COMMANDS, PRIMARY, REPLICA, get_node_name
1919
from redis.crc import REDIS_CLUSTER_HASH_SLOTS, key_slot
2020
from redis.exceptions import (

0 commit comments

Comments
 (0)