Skip to content

Commit a4e375e

Browse files
Fix from_ alias type hinting
1 parent ac95b8e commit a4e375e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/replit_river/rpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33
from collections.abc import AsyncIterable, AsyncIterator
44
from typing import (
5+
Annotated,
56
Any,
67
Awaitable,
78
Callable,
@@ -91,7 +92,7 @@ class PropagationContext(BaseModel):
9192
class TransportMessage(BaseModel):
9293
id: str
9394
# from_ is used instead of from because from is a reserved keyword in Python
94-
from_: str = Field(..., alias="from")
95+
from_: Annotated[str, Field(alias="from")]
9596
to: str
9697
seq: int
9798
ack: int

0 commit comments

Comments
 (0)