Skip to content

Commit a93b0e9

Browse files
Consolidating
1 parent b518386 commit a93b0e9

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

tests/v2/fixtures/raw_ws_server.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
AsyncIterator,
44
Awaitable,
55
Callable,
6+
Literal,
67
TypeAlias,
78
TypedDict,
89
)
@@ -20,6 +21,11 @@
2021
]
2122

2223

24+
class OuterPayload[A](TypedDict):
25+
ok: Literal[True]
26+
payload: A
27+
28+
2329
class _WsServerState(TypedDict):
2430
ipv4_laddr: tuple[str, int] | None
2531

tests/v2/test_v2_cancellation.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from typing import (
44
Any,
55
AsyncIterator,
6-
Literal,
7-
TypedDict,
86
)
97

108
import msgpack
@@ -20,12 +18,7 @@
2018
from replit_river.transport_options import TransportOptions
2119
from replit_river.v2.client import Client
2220
from replit_river.v2.session import STREAM_CANCEL_BIT
23-
from tests.v2.fixtures.raw_ws_server import WsServerFixture
24-
25-
26-
class OuterPayload[A](TypedDict):
27-
ok: Literal[True]
28-
payload: A
21+
from tests.v2.fixtures.raw_ws_server import OuterPayload, WsServerFixture
2922

3023

3124
async def test_upload_cancel(ws_server: WsServerFixture) -> None:

tests/v2/test_v2_session_lifecycle.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import asyncio
22
import logging
3-
from typing import (
4-
Literal,
5-
TypedDict,
6-
)
73

84
import msgpack
95
import nanoid
@@ -23,11 +19,6 @@
2319
from tests.v2.fixtures.raw_ws_server import WsServerFixture
2420

2521

26-
class OuterPayload[A](TypedDict):
27-
ok: Literal[True]
28-
payload: A
29-
30-
3122
class _PermissiveRateLimiter(RateLimiter):
3223
def start_restoring_budget(self, user: str) -> None:
3324
pass

0 commit comments

Comments
 (0)