Skip to content

Commit 61d31a0

Browse files
committed
Fixed syntax errors on Python 3.8
1 parent 7e9c513 commit 61d31a0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

redis/anyio/_commands/cluster.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from collections.abc import Sequence
24
from typing import (
35
Any,

redis/anyio/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from collections.abc import Callable, Coroutine, Sequence
24
from typing import Any, TYPE_CHECKING
35

tests/test_anyio/test_cluster.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ async def run(self, *, task_status: TaskStatus[None]) -> NoReturn:
8787

8888
async def handle(self, client_stream: SocketStream) -> None:
8989
# establish connection to redis
90-
async with (
91-
client_stream,
92-
await anyio.connect_tcp(*self.redis_addr) as proxied_stream
93-
):
90+
proxied_stream = await anyio.connect_tcp(*self.redis_addr)
91+
async with client_stream, proxied_stream:
9492
self.n_connections += 1
9593
async with anyio.create_task_group() as tg:
9694
tg.start_soon(self.pipe, client_stream, proxied_stream)

0 commit comments

Comments
 (0)