Skip to content

Commit

Permalink
fix responses stream_writer and respond_stream interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
livioribeiro committed Dec 17, 2023
1 parent 5da1be3 commit 8c647fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/asgikit/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ async def __listen_for_disconnect(receive):


@asynccontextmanager
async def stream_writer(response):
async def stream_writer(response: Response):
client_disconect = asyncio.create_task(
__listen_for_disconnect(response.asgi.receive)
)
Expand All @@ -300,7 +300,7 @@ async def write(data: bytes | str):


async def respond_stream(
response: Response, stream: AsyncIterable[bytes], *, status=HTTPStatus.OK
response: Response, stream: AsyncIterable[bytes | str], *, status=HTTPStatus.OK
):
await response.start(status)

Expand Down

0 comments on commit 8c647fb

Please sign in to comment.