1616
1717_Message = typing .MutableMapping [str , typing .Any ]
1818_Receive = typing .Callable [[], typing .Awaitable [_Message ]]
19- _Send = typing .Callable [
20- [typing .MutableMapping [str , typing .Any ]], typing .Awaitable [None ]
21- ]
19+ _Send = typing .Callable [[_Message ], typing .Awaitable [None ]]
2220_ASGIApp = typing .Callable [
2321 [typing .MutableMapping [str , typing .Any ], _Receive , _Send ], typing .Awaitable [None ]
2422]
@@ -131,7 +129,7 @@ async def handle_async_request(
131129
132130 # ASGI callables.
133131
134- async def receive () -> dict [ str , typing . Any ] :
132+ async def receive () -> _Message :
135133 nonlocal request_complete
136134
137135 if request_complete :
@@ -145,7 +143,7 @@ async def receive() -> dict[str, typing.Any]:
145143 return {"type" : "http.request" , "body" : b"" , "more_body" : False }
146144 return {"type" : "http.request" , "body" : body , "more_body" : True }
147145
148- async def send (message : typing . MutableMapping [ str , typing . Any ] ) -> None :
146+ async def send (message : _Message ) -> None :
149147 nonlocal status_code , response_headers , response_started
150148
151149 if message ["type" ] == "http.response.start" :
0 commit comments