Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Commit 40dd72f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6e671cb commit 40dd72f

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

aioredis/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def __init__(
13071307
max_connections: Optional[int] = None,
13081308
**connection_kwargs,
13091309
):
1310-
max_connections = max_connections or 2 ** 31
1310+
max_connections = max_connections or 2**31
13111311
if not isinstance(max_connections, int) or max_connections < 0:
13121312
raise ValueError('"max_connections" must be a positive integer')
13131313

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ async def wait_for_command(client: aioredis.Redis, monitor: Monitor, command: st
292292
if StrictVersion(redis_version) >= StrictVersion("5.0.0"):
293293
id_str = str(await client.client_id())
294294
else:
295-
id_str = "%08x" % random.randrange(2 ** 32)
295+
id_str = "%08x" % random.randrange(2**32)
296296
key = "__REDIS-PY-%s__" % id_str
297297
await client.get(key)
298298
while True:

tests/test_commands.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,7 +2393,7 @@ async def test_xack(self, r: aioredis.Redis):
23932393
async def test_xadd(self, r: aioredis.Redis):
23942394
stream = "stream"
23952395
message_id = await r.xadd(stream, {"foo": "bar"})
2396-
assert re.match(br"[0-9]+\-[0-9]+", message_id)
2396+
assert re.match(rb"[0-9]+\-[0-9]+", message_id)
23972397

23982398
# explicit message id
23992399
message_id = b"9999999999999999999-0"
@@ -2432,17 +2432,14 @@ async def test_xclaim(self, r: aioredis.Redis):
24322432

24332433
# reclaim the message as consumer1, but use the justid argument
24342434
# which only returns message ids
2435-
assert (
2436-
await r.xclaim(
2437-
stream,
2438-
group,
2439-
consumer1,
2440-
min_idle_time=0,
2441-
message_ids=(message_id,),
2442-
justid=True,
2443-
)
2444-
== [message_id]
2445-
)
2435+
assert await r.xclaim(
2436+
stream,
2437+
group,
2438+
consumer1,
2439+
min_idle_time=0,
2440+
message_ids=(message_id,),
2441+
justid=True,
2442+
) == [message_id]
24462443

24472444
@skip_if_server_version_lt("5.0.0")
24482445
async def test_xclaim_trimmed(self, r: aioredis.Redis):

0 commit comments

Comments
 (0)