Skip to content

Commit e95d07c

Browse files
Typing the output channel slightly
1 parent 641cd74 commit e95d07c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/replit_river/v2/session.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class StreamMeta(TypedDict):
125125
span: Span
126126
release_backpressured_waiter: Callable[[], None]
127127
error_channel: Channel[Exception]
128-
output: Channel[Any]
128+
output: Channel[ResultType]
129129

130130

131131
class Session[HandshakeMetadata]:
@@ -600,7 +600,7 @@ async def _with_stream(
600600
since the first event does not care about backpressure, but subsequent events
601601
emitted should call await error_channel.wait() prior to emission.
602602
"""
603-
output: Channel[Any] = Channel(maxsize=maxsize)
603+
output: Channel[ResultType] = Channel(maxsize=maxsize)
604604
backpressured_waiter_event: asyncio.Event = asyncio.Event()
605605
error_channel: Channel[Exception] = Channel(maxsize=1)
606606
self._streams[stream_id] = {
@@ -697,6 +697,7 @@ async def send_rpc[R, A](
697697
) from e
698698
except Exception as e:
699699
raise RiverException(ERROR_CODE_STREAM_CLOSED, str(e)) from e
700+
700701
if "ok" not in result or not result["ok"]:
701702
try:
702703
error = error_deserializer(result["payload"])

0 commit comments

Comments
 (0)