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

Commit f017394

Browse files
authored
Merge pull request #1264 from aio-libs/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 8230473 + 40dd72f commit f017394

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
- id: isort
2121
args: ["--profile", "black"]
2222
- repo: https://github.com/psf/black
23-
rev: '21.12b0'
23+
rev: '22.1.0'
2424
hooks:
2525
- id: black
2626
language_version: python3 # Should be a command that runs python3.6+
@@ -55,7 +55,7 @@ repos:
5555
- id: detect-private-key
5656
exclude: ^examples|(?:tests/ssl)/
5757
- repo: https://github.com/asottile/pyupgrade
58-
rev: 'v2.29.1'
58+
rev: 'v2.31.0'
5959
hooks:
6060
- id: pyupgrade
6161
args: ['--py36-plus', '--keep-mock']

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)