Skip to content

Commit

Permalink
chore: make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Jun 10, 2024
1 parent 4745366 commit d7b0358
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion starlette/middleware/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ async def coro() -> None:

assert message["type"] == "http.response.start"

async def body_stream() -> typing.AsyncGenerator[bytes, None]:
async def body_stream() -> (
typing.AsyncGenerator[
typing.Union[bytes, typing.MutableMapping[str, typing.Any]], None
]
):
async with recv_stream:
async for message in recv_stream:
if message["type"] == "http.response.pathsend":
Expand Down
2 changes: 1 addition & 1 deletion starlette/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def __init__(
self.headers["location"] = quote(str(url), safe=":/%#?=@[]!$&'()*+,;")


Content = typing.Union[str, bytes, memoryview]
Content = typing.Union[str, bytes, memoryview, typing.MutableMapping[str, typing.Any]]
SyncContentStream = typing.Iterable[Content]
AsyncContentStream = typing.AsyncIterable[Content]
ContentStream = typing.Union[AsyncContentStream, SyncContentStream]
Expand Down

0 comments on commit d7b0358

Please sign in to comment.