|
16 | 16 | Event = typing.Union[asyncio.Event, trio.Event] |
17 | 17 |
|
18 | 18 |
|
19 | | -_Message = typing.Dict[str, typing.Any] |
| 19 | +_Message = typing.MutableMapping[str, typing.Any] |
20 | 20 | _Receive = typing.Callable[[], typing.Awaitable[_Message]] |
21 | 21 | _Send = typing.Callable[ |
22 | | - [typing.Dict[str, typing.Any]], typing.Coroutine[None, None, None] |
| 22 | + [typing.MutableMapping[str, typing.Any]], typing.Awaitable[None] |
23 | 23 | ] |
24 | 24 | _ASGIApp = typing.Callable[ |
25 | | - [typing.Dict[str, typing.Any], _Receive, _Send], typing.Coroutine[None, None, None] |
| 25 | + [typing.MutableMapping[str, typing.Any], _Receive, _Send], typing.Awaitable[None] |
26 | 26 | ] |
27 | 27 |
|
28 | 28 |
|
@@ -139,7 +139,7 @@ async def receive() -> dict[str, typing.Any]: |
139 | 139 | return {"type": "http.request", "body": b"", "more_body": False} |
140 | 140 | return {"type": "http.request", "body": body, "more_body": True} |
141 | 141 |
|
142 | | - async def send(message: dict[str, typing.Any]) -> None: |
| 142 | + async def send(message: typing.MutableMapping[str, typing.Any]) -> None: |
143 | 143 | nonlocal status_code, response_headers, response_started |
144 | 144 |
|
145 | 145 | if message["type"] == "http.response.start": |
|
0 commit comments