Skip to content

Commit

Permalink
Add comment in response convertor
Browse files Browse the repository at this point in the history
  • Loading branch information
abersheeran committed Jul 10, 2024
1 parent 7d6b45c commit cad6d16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kui/asgi/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def _none(ret: Type[None]) -> NoReturn:
response_converter.register(tuple, JSONResponse)
response_converter.register(bytes, PlainTextResponse)
response_converter.register(str, PlainTextResponse)
# Because of we can't call `await anext(ag)` in the `response_converter` function,
# so we can't convert `AsyncGenerator` to `SendEventResponse | StreamResponse`.
response_converter.register(AsyncGeneratorType, SendEventResponse)
response_converter.register(
PurePath,
Expand Down

0 comments on commit cad6d16

Please sign in to comment.