summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gilman <dgilman@aidentified.com>2022-12-14 04:18:41 -0500
committerGitHub <noreply@github.com>2022-12-14 11:18:41 +0200
commit3fb65de645bf4dd1beb8e893bdaa2c4766bbd1fa (patch)
treed5074882a70d502c91122f252788f27f1670901e
parent6487f9555ba2d08083a081df9b65b642427361fa (diff)
downloadredis-py-3fb65de645bf4dd1beb8e893bdaa2c4766bbd1fa.tar.gz
Combine auto-concatenated strings (#2482)
-rw-r--r--benchmarks/basic_operations.py2
-rw-r--r--redis/asyncio/client.py6
-rw-r--r--redis/asyncio/lock.py6
-rwxr-xr-xredis/client.py8
-rw-r--r--redis/cluster.py4
-rw-r--r--redis/commands/core.py42
-rw-r--r--redis/commands/graph/node.py2
-rw-r--r--redis/commands/search/commands.py2
-rwxr-xr-xredis/connection.py4
-rw-r--r--redis/lock.py2
-rw-r--r--tests/conftest.py4
-rw-r--r--tests/test_asyncio/test_cluster.py6
-rw-r--r--tests/test_asyncio/test_commands.py2
-rw-r--r--tests/test_asyncio/test_connection_pool.py2
-rw-r--r--tests/test_asyncio/test_pipeline.py8
-rw-r--r--tests/test_asyncio/test_pubsub.py2
-rw-r--r--tests/test_cluster.py8
-rw-r--r--tests/test_commands.py2
-rw-r--r--tests/test_connection_pool.py2
-rw-r--r--tests/test_pipeline.py8
20 files changed, 58 insertions, 64 deletions
diff --git a/benchmarks/basic_operations.py b/benchmarks/basic_operations.py
index 1dc4a87..c9f5853 100644
--- a/benchmarks/basic_operations.py
+++ b/benchmarks/basic_operations.py
@@ -13,7 +13,7 @@ def parse_args():
parser.add_argument(
"-P",
type=int,
- help=("Pipeline <numreq> requests." " Default 1 (no pipeline)."),
+ help=("Pipeline <numreq> requests. Default 1 (no pipeline)."),
default=1,
)
parser.add_argument(
diff --git a/redis/asyncio/client.py b/redis/asyncio/client.py
index abe7d67..5a2c496 100644
--- a/redis/asyncio/client.py
+++ b/redis/asyncio/client.py
@@ -1132,7 +1132,7 @@ class Pipeline(Redis): # lgtm [py/init-calls-subclass]
raise RedisError("Cannot issue nested calls to MULTI")
if self.command_stack:
raise RedisError(
- "Commands without an initial WATCH have already " "been issued"
+ "Commands without an initial WATCH have already been issued"
)
self.explicit_transaction = True
@@ -1157,7 +1157,7 @@ class Pipeline(Redis): # lgtm [py/init-calls-subclass]
if self.watching:
await self.reset()
raise WatchError(
- "A ConnectionError occurred on while " "watching one or more keys"
+ "A ConnectionError occurred on while watching one or more keys"
)
# if retry_on_timeout is not set, or the error is not
# a TimeoutError, raise it
@@ -1345,7 +1345,7 @@ class Pipeline(Redis): # lgtm [py/init-calls-subclass]
# indicates the user should retry this transaction.
if self.watching:
raise WatchError(
- "A ConnectionError occurred on while " "watching one or more keys"
+ "A ConnectionError occurred on while watching one or more keys"
)
# if retry_on_timeout is not set, or the error is not
# a TimeoutError, raise it
diff --git a/redis/asyncio/lock.py b/redis/asyncio/lock.py
index 7f45c8b..2f78d69 100644
--- a/redis/asyncio/lock.py
+++ b/redis/asyncio/lock.py
@@ -259,7 +259,7 @@ class Lock:
keys=[self.name], args=[expected_token], client=self.redis
)
):
- raise LockNotOwnedError("Cannot release a lock" " that's no longer owned")
+ raise LockNotOwnedError("Cannot release a lock that's no longer owned")
def extend(
self, additional_time: float, replace_ttl: bool = False
@@ -289,7 +289,7 @@ class Lock:
client=self.redis,
)
):
- raise LockNotOwnedError("Cannot extend a lock that's" " no longer owned")
+ raise LockNotOwnedError("Cannot extend a lock that's no longer owned")
return True
def reacquire(self) -> Awaitable[bool]:
@@ -309,5 +309,5 @@ class Lock:
keys=[self.name], args=[self.local.token, timeout], client=self.redis
)
):
- raise LockNotOwnedError("Cannot reacquire a lock that's" " no longer owned")
+ raise LockNotOwnedError("Cannot reacquire a lock that's no longer owned")
return True
diff --git a/redis/client.py b/redis/client.py
index ed857c8..1a9b96b 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -1881,7 +1881,7 @@ class Pipeline(Redis):
raise RedisError("Cannot issue nested calls to MULTI")
if self.command_stack:
raise RedisError(
- "Commands without an initial WATCH have already " "been issued"
+ "Commands without an initial WATCH have already been issued"
)
self.explicit_transaction = True
@@ -1904,7 +1904,7 @@ class Pipeline(Redis):
if self.watching:
self.reset()
raise WatchError(
- "A ConnectionError occurred on while " "watching one or more keys"
+ "A ConnectionError occurred on while watching one or more keys"
)
# if retry_on_timeout is not set, or the error is not
# a TimeoutError, raise it
@@ -1997,7 +1997,7 @@ class Pipeline(Redis):
if len(response) != len(commands):
self.connection.disconnect()
raise ResponseError(
- "Wrong number of response items from " "pipeline execution"
+ "Wrong number of response items from pipeline execution"
)
# find any errors in the response and raise if necessary
@@ -2078,7 +2078,7 @@ class Pipeline(Redis):
# indicates the user should retry this transaction.
if self.watching:
raise WatchError(
- "A ConnectionError occurred on while " "watching one or more keys"
+ "A ConnectionError occurred on while watching one or more keys"
)
# if retry_on_timeout is not set, or the error is not
# a TimeoutError, raise it
diff --git a/redis/cluster.py b/redis/cluster.py
index cd559b6..f115007 100644
--- a/redis/cluster.py
+++ b/redis/cluster.py
@@ -1648,7 +1648,7 @@ class ClusterPubSub(PubSub):
pubsub_node = node
elif any([host, port]) is True:
# only 'host' or 'port' passed
- raise DataError("Passing a host requires passing a port, " "and vice versa")
+ raise DataError("Passing a host requires passing a port, and vice versa")
else:
# nothing passed by the user. set node to None
pubsub_node = None
@@ -2126,7 +2126,7 @@ class ClusterPipeline(RedisCluster):
"""
if len(names) != 1:
raise RedisClusterException(
- "deleting multiple keys is not " "implemented in pipeline command"
+ "deleting multiple keys is not implemented in pipeline command"
)
return self.execute_command("DEL", names[0])
diff --git a/redis/commands/core.py b/redis/commands/core.py
index eaedffb..4cd0a9f 100644
--- a/redis/commands/core.py
+++ b/redis/commands/core.py
@@ -101,7 +101,7 @@ class ACLCommands(CommandsProtocol):
raise ValueError
except ValueError:
raise DataError(
- "genpass optionally accepts a bits argument, " "between 0 and 4096."
+ "genpass optionally accepts a bits argument, between 0 and 4096."
)
return self.execute_command("ACL GENPASS", *pieces, **kwargs)
@@ -142,7 +142,7 @@ class ACLCommands(CommandsProtocol):
args = []
if count is not None:
if not isinstance(count, int):
- raise DataError("ACL LOG count must be an " "integer")
+ raise DataError("ACL LOG count must be an integer")
args.append(count)
return self.execute_command("ACL LOG", *args, **kwargs)
@@ -276,7 +276,7 @@ class ACLCommands(CommandsProtocol):
if (passwords or hashed_passwords) and nopass:
raise DataError(
- "Cannot set 'nopass' and supply " "'passwords' or 'hashed_passwords'"
+ "Cannot set 'nopass' and supply 'passwords' or 'hashed_passwords'"
)
if passwords:
@@ -1613,7 +1613,7 @@ class BasicKeyCommands(CommandsProtocol):
if start is not None and end is not None:
params.append(end)
elif start is None and end is not None:
- raise DataError("start argument is not set, " "when end is specified")
+ raise DataError("start argument is not set, when end is specified")
if mode is not None:
params.append(mode)
@@ -3457,9 +3457,7 @@ class StreamCommands(CommandsProtocol):
"""
pieces: list[EncodableT] = []
if maxlen is not None and minid is not None:
- raise DataError(
- "Only one of ```maxlen``` or ```minid``` " "may be specified"
- )
+ raise DataError("Only one of ```maxlen``` or ```minid``` may be specified")
if maxlen is not None:
if not isinstance(maxlen, int) or maxlen < 1:
@@ -3515,7 +3513,7 @@ class StreamCommands(CommandsProtocol):
try:
if int(min_idle_time) < 0:
raise DataError(
- "XAUTOCLAIM min_idle_time must be a non" "negative integer"
+ "XAUTOCLAIM min_idle_time must be a nonnegative integer"
)
except TypeError:
pass
@@ -3573,7 +3571,7 @@ class StreamCommands(CommandsProtocol):
For more information see https://redis.io/commands/xclaim
"""
if not isinstance(min_idle_time, int) or min_idle_time < 0:
- raise DataError("XCLAIM min_idle_time must be a non negative " "integer")
+ raise DataError("XCLAIM min_idle_time must be a non negative integer")
if not isinstance(message_ids, (list, tuple)) or not message_ids:
raise DataError(
"XCLAIM message_ids must be a non empty list or "
@@ -3906,7 +3904,7 @@ class StreamCommands(CommandsProtocol):
pieces.append(str(count))
if block is not None:
if not isinstance(block, int) or block < 0:
- raise DataError("XREADGROUP block must be a non-negative " "integer")
+ raise DataError("XREADGROUP block must be a non-negative integer")
pieces.append(b"BLOCK")
pieces.append(str(block))
if noack:
@@ -3968,7 +3966,7 @@ class StreamCommands(CommandsProtocol):
"""
pieces: list[EncodableT] = []
if maxlen is not None and minid is not None:
- raise DataError("Only one of ``maxlen`` or ``minid`` " "may be specified")
+ raise DataError("Only one of ``maxlen`` or ``minid`` may be specified")
if maxlen is None and minid is None:
raise DataError("One of ``maxlen`` or ``minid`` must be specified")
@@ -4342,14 +4340,12 @@ class SortedSetCommands(CommandsProtocol):
num: Union[int, None] = None,
) -> ResponseT:
if byscore and bylex:
- raise DataError(
- "``byscore`` and ``bylex`` can not be " "specified together."
- )
+ raise DataError("``byscore`` and ``bylex`` can not be specified together.")
if (offset is not None and num is None) or (num is not None and offset is None):
raise DataError("``offset`` and ``num`` must both be specified.")
if bylex and withscores:
raise DataError(
- "``withscores`` not supported in combination " "with ``bylex``."
+ "``withscores`` not supported in combination with ``bylex``."
)
pieces = [command]
if dest:
@@ -5301,7 +5297,7 @@ class GeoCommands(CommandsProtocol):
if nx and xx:
raise DataError("GEOADD allows either 'nx' or 'xx', not both")
if len(values) % 3 != 0:
- raise DataError("GEOADD requires places with lon, lat and name" " values")
+ raise DataError("GEOADD requires places with lon, lat and name values")
pieces = [name]
if nx:
pieces.append("NX")
@@ -5487,7 +5483,7 @@ class GeoCommands(CommandsProtocol):
raise DataError("GEORADIUS invalid sort")
if kwargs["store"] and kwargs["store_dist"]:
- raise DataError("GEORADIUS store and store_dist cant be set" " together")
+ raise DataError("GEORADIUS store and store_dist cant be set together")
if kwargs["store"]:
pieces.extend([b"STORE", kwargs["store"]])
@@ -5624,13 +5620,11 @@ class GeoCommands(CommandsProtocol):
# FROMMEMBER or FROMLONLAT
if kwargs["member"] is None:
if kwargs["longitude"] is None or kwargs["latitude"] is None:
- raise DataError(
- "GEOSEARCH must have member or" " longitude and latitude"
- )
+ raise DataError("GEOSEARCH must have member or longitude and latitude")
if kwargs["member"]:
if kwargs["longitude"] or kwargs["latitude"]:
raise DataError(
- "GEOSEARCH member and longitude or latitude" " cant be set together"
+ "GEOSEARCH member and longitude or latitude cant be set together"
)
pieces.extend([b"FROMMEMBER", kwargs["member"]])
if kwargs["longitude"] is not None and kwargs["latitude"] is not None:
@@ -5639,7 +5633,7 @@ class GeoCommands(CommandsProtocol):
# BYRADIUS or BYBOX
if kwargs["radius"] is None:
if kwargs["width"] is None or kwargs["height"] is None:
- raise DataError("GEOSEARCH must have radius or" " width and height")
+ raise DataError("GEOSEARCH must have radius or width and height")
if kwargs["unit"] is None:
raise DataError("GEOSEARCH must have unit")
if kwargs["unit"].lower() not in ("m", "km", "mi", "ft"):
@@ -5647,7 +5641,7 @@ class GeoCommands(CommandsProtocol):
if kwargs["radius"]:
if kwargs["width"] or kwargs["height"]:
raise DataError(
- "GEOSEARCH radius and width or height" " cant be set together"
+ "GEOSEARCH radius and width or height cant be set together"
)
pieces.extend([b"BYRADIUS", kwargs["radius"], kwargs["unit"]])
if kwargs["width"] and kwargs["height"]:
@@ -5668,7 +5662,7 @@ class GeoCommands(CommandsProtocol):
if kwargs["any"]:
pieces.append(b"ANY")
elif kwargs["any"]:
- raise DataError("GEOSEARCH ``any`` can't be provided " "without count")
+ raise DataError("GEOSEARCH ``any`` can't be provided without count")
# other properties
for arg_name, byte_repr in (
diff --git a/redis/commands/graph/node.py b/redis/commands/graph/node.py
index c5f8429..0ebe510 100644
--- a/redis/commands/graph/node.py
+++ b/redis/commands/graph/node.py
@@ -32,7 +32,7 @@ class Node:
self.labels = label
else:
raise AssertionError(
- "label should be either None, " "string or a list of strings"
+ "label should be either None, string or a list of strings"
)
self.properties = properties or {}
diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py
index f02805e..3bd7d47 100644
--- a/redis/commands/search/commands.py
+++ b/redis/commands/search/commands.py
@@ -527,7 +527,7 @@ class SearchCommands:
cmd += query.get_args()
cmd += self.get_params_args(query_params)
else:
- raise ValueError("Must provide AggregateRequest object or " "Query object.")
+ raise ValueError("Must provide AggregateRequest object or Query object.")
res = self.execute_command(*cmd)
diff --git a/redis/connection.py b/redis/connection.py
index 9c5b536..dce0735 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -62,9 +62,9 @@ SYM_EMPTY = b""
SERVER_CLOSED_CONNECTION_ERROR = "Connection closed by server."
SENTINEL = object()
-MODULE_LOAD_ERROR = "Error loading the extension. " "Please check the server logs."
+MODULE_LOAD_ERROR = "Error loading the extension. Please check the server logs."
NO_SUCH_MODULE_ERROR = "Error unloading module: no such module with that name"
-MODULE_UNLOAD_NOT_POSSIBLE_ERROR = "Error unloading module: operation not " "possible."
+MODULE_UNLOAD_NOT_POSSIBLE_ERROR = "Error unloading module: operation not possible."
MODULE_EXPORTS_DATA_TYPES_ERROR = (
"Error unloading module: the module "
"exports one or more module-side data "
diff --git a/redis/lock.py b/redis/lock.py
index 912ff57..4cca102 100644
--- a/redis/lock.py
+++ b/redis/lock.py
@@ -256,7 +256,7 @@ class Lock:
if not bool(
self.lua_release(keys=[self.name], args=[expected_token], client=self.redis)
):
- raise LockNotOwnedError("Cannot release a lock" " that's no longer owned")
+ raise LockNotOwnedError("Cannot release a lock that's no longer owned")
def extend(self, additional_time: int, replace_ttl: bool = False) -> bool:
"""
diff --git a/tests/conftest.py b/tests/conftest.py
index 3d40375..27dcc74 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -77,7 +77,7 @@ def pytest_addoption(parser):
"--redis-url",
default=default_redis_url,
action="store",
- help="Redis connection string," " defaults to `%(default)s`",
+ help="Redis connection string, defaults to `%(default)s`",
)
parser.addoption(
@@ -93,7 +93,7 @@ def pytest_addoption(parser):
"--redis-ssl-url",
default=default_redis_ssl_url,
action="store",
- help="Redis SSL connection string," " defaults to `%(default)s`",
+ help="Redis SSL connection string, defaults to `%(default)s`",
)
parser.addoption(
diff --git a/tests/test_asyncio/test_cluster.py b/tests/test_asyncio/test_cluster.py
index 1997c95..13e5e26 100644
--- a/tests/test_asyncio/test_cluster.py
+++ b/tests/test_asyncio/test_cluster.py
@@ -171,7 +171,7 @@ async def moved_redirection_helper(
prev_primary = rc.nodes_manager.get_node_from_slot(slot)
if failover:
if len(rc.nodes_manager.slots_cache[slot]) < 2:
- warnings.warn("Skipping this test since it requires to have a " "replica")
+ warnings.warn("Skipping this test since it requires to have a replica")
return
redirect_node = rc.nodes_manager.slots_cache[slot][1]
else:
@@ -327,7 +327,7 @@ class TestRedisClusterObj:
RedisCluster(startup_nodes=[])
assert str(ex.value).startswith(
- "RedisCluster requires at least one node to discover the " "cluster"
+ "RedisCluster requires at least one node to discover the cluster"
), str_if_bytes(ex.value)
async def test_from_url(self, request: FixtureRequest) -> None:
@@ -371,7 +371,7 @@ class TestRedisClusterObj:
with pytest.raises(RedisClusterException) as ex:
await r.execute_command("GET")
assert str(ex.value).startswith(
- "No way to dispatch this command to " "Redis Cluster. Missing key."
+ "No way to dispatch this command to Redis Cluster. Missing key."
)
async def test_execute_command_node_flag_primaries(self, r: RedisCluster) -> None:
diff --git a/tests/test_asyncio/test_commands.py b/tests/test_asyncio/test_commands.py
index 67471bb..7c6fd45 100644
--- a/tests/test_asyncio/test_commands.py
+++ b/tests/test_asyncio/test_commands.py
@@ -199,7 +199,7 @@ class TestRedisCommands:
# Resets and tests that hashed passwords are set properly.
hashed_password = (
- "5e884898da28047151d0e56f8dc629" "2773603d0d6aabbdd62a11ef721d1542d8"
+ "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
)
assert await r.acl_setuser(
username, enabled=True, reset=True, hashed_passwords=["+" + hashed_password]
diff --git a/tests/test_asyncio/test_connection_pool.py b/tests/test_asyncio/test_connection_pool.py
index 35f23f4..5de25f2 100644
--- a/tests/test_asyncio/test_connection_pool.py
+++ b/tests/test_asyncio/test_connection_pool.py
@@ -416,7 +416,7 @@ class TestConnectionPoolURLParsing:
def test_invalid_extra_typed_querystring_options(self):
with pytest.raises(ValueError):
redis.ConnectionPool.from_url(
- "redis://localhost/2?socket_timeout=_&" "socket_connect_timeout=abc"
+ "redis://localhost/2?socket_timeout=_&socket_connect_timeout=abc"
)
def test_extra_querystring_options(self):
diff --git a/tests/test_asyncio/test_pipeline.py b/tests/test_asyncio/test_pipeline.py
index d613f49..3df57eb 100644
--- a/tests/test_asyncio/test_pipeline.py
+++ b/tests/test_asyncio/test_pipeline.py
@@ -124,7 +124,7 @@ class TestPipeline:
with pytest.raises(redis.ResponseError) as ex:
await pipe.execute()
assert str(ex.value).startswith(
- "Command # 3 (LPUSH c 3) of " "pipeline caused error: "
+ "Command # 3 (LPUSH c 3) of pipeline caused error: "
)
# make sure the pipe was restored to a working state
@@ -169,7 +169,7 @@ class TestPipeline:
await pipe.execute()
assert str(ex.value).startswith(
- "Command # 2 (ZREM b) of " "pipeline caused error: "
+ "Command # 2 (ZREM b) of pipeline caused error: "
)
# make sure the pipe was restored to a working state
@@ -186,7 +186,7 @@ class TestPipeline:
await pipe.execute()
assert str(ex.value).startswith(
- "Command # 2 (ZREM b) of " "pipeline caused error: "
+ "Command # 2 (ZREM b) of pipeline caused error: "
)
# make sure the pipe was restored to a working state
@@ -333,7 +333,7 @@ class TestPipeline:
await pipe.execute()
assert str(ex.value).startswith(
- "Command # 1 (LLEN a) of " "pipeline caused error: "
+ "Command # 1 (LLEN a) of pipeline caused error: "
)
assert await r.get("a") == b"1"
diff --git a/tests/test_asyncio/test_pubsub.py b/tests/test_asyncio/test_pubsub.py
index 6dedca9..37b7206 100644
--- a/tests/test_asyncio/test_pubsub.py
+++ b/tests/test_asyncio/test_pubsub.py
@@ -411,7 +411,7 @@ class TestPubSubMessages:
with pytest.raises(RuntimeError) as info:
await p.get_message()
expect = (
- "connection not set: " "did you forget to call subscribe() or psubscribe()?"
+ "connection not set: did you forget to call subscribe() or psubscribe()?"
)
assert expect in info.exconly()
diff --git a/tests/test_cluster.py b/tests/test_cluster.py
index 43aeb9e..e45780d 100644
--- a/tests/test_cluster.py
+++ b/tests/test_cluster.py
@@ -176,7 +176,7 @@ def moved_redirection_helper(request, failover=False):
prev_primary = rc.nodes_manager.get_node_from_slot(slot)
if failover:
if len(rc.nodes_manager.slots_cache[slot]) < 2:
- warnings.warn("Skipping this test since it requires to have a " "replica")
+ warnings.warn("Skipping this test since it requires to have a replica")
return
redirect_node = rc.nodes_manager.slots_cache[slot][1]
else:
@@ -244,7 +244,7 @@ class TestRedisClusterObj:
RedisCluster(startup_nodes=[])
assert str(ex.value).startswith(
- "RedisCluster requires at least one node to discover the " "cluster"
+ "RedisCluster requires at least one node to discover the cluster"
), str_if_bytes(ex.value)
def test_from_url(self, r):
@@ -265,7 +265,7 @@ class TestRedisClusterObj:
with pytest.raises(RedisClusterException) as ex:
r.execute_command("GET")
assert str(ex.value).startswith(
- "No way to dispatch this command to " "Redis Cluster. Missing key."
+ "No way to dispatch this command to Redis Cluster. Missing key."
)
def test_execute_command_node_flag_primaries(self, r):
@@ -2789,7 +2789,7 @@ class TestClusterPipeline:
ask_node = node
break
if ask_node is None:
- warnings.warn("skipping this test since the cluster has only one " "node")
+ warnings.warn("skipping this test since the cluster has only one node")
return
ask_msg = f"{r.keyslot(key)} {ask_node.host}:{ask_node.port}"
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 12ffcfe..36d004c 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -274,7 +274,7 @@ class TestRedisCommands:
# Resets and tests that hashed passwords are set properly.
hashed_password = (
- "5e884898da28047151d0e56f8dc629" "2773603d0d6aabbdd62a11ef721d1542d8"
+ "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
)
assert r.acl_setuser(
username, enabled=True, reset=True, hashed_passwords=["+" + hashed_password]
diff --git a/tests/test_connection_pool.py b/tests/test_connection_pool.py
index 73eb6e1..e8a4269 100644
--- a/tests/test_connection_pool.py
+++ b/tests/test_connection_pool.py
@@ -314,7 +314,7 @@ class TestConnectionPoolURLParsing:
def test_invalid_extra_typed_querystring_options(self):
with pytest.raises(ValueError):
redis.ConnectionPool.from_url(
- "redis://localhost/2?socket_timeout=_&" "socket_connect_timeout=abc"
+ "redis://localhost/2?socket_timeout=_&socket_connect_timeout=abc"
)
def test_extra_querystring_options(self):
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
index 03377d8..716cd0f 100644
--- a/tests/test_pipeline.py
+++ b/tests/test_pipeline.py
@@ -122,7 +122,7 @@ class TestPipeline:
with pytest.raises(redis.ResponseError) as ex:
pipe.execute()
assert str(ex.value).startswith(
- "Command # 3 (LPUSH c 3) of " "pipeline caused error: "
+ "Command # 3 (LPUSH c 3) of pipeline caused error: "
)
# make sure the pipe was restored to a working state
@@ -167,7 +167,7 @@ class TestPipeline:
pipe.execute()
assert str(ex.value).startswith(
- "Command # 2 (ZREM b) of " "pipeline caused error: "
+ "Command # 2 (ZREM b) of pipeline caused error: "
)
# make sure the pipe was restored to a working state
@@ -184,7 +184,7 @@ class TestPipeline:
pipe.execute()
assert str(ex.value).startswith(
- "Command # 2 (ZREM b) of " "pipeline caused error: "
+ "Command # 2 (ZREM b) of pipeline caused error: "
)
# make sure the pipe was restored to a working state
@@ -331,7 +331,7 @@ class TestPipeline:
pipe.execute()
assert str(ex.value).startswith(
- "Command # 1 (LLEN a) of " "pipeline caused error: "
+ "Command # 1 (LLEN a) of pipeline caused error: "
)
assert r["a"] == b"1"