Skip to content

Commit b587c1a

Browse files
committed
Fixed black errors
1 parent 4664a1e commit b587c1a

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

starlette/middleware/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
108108
async def call_next(request: Request) -> Response:
109109
app_exc: typing.Optional[Exception] = None
110110
send_stream, recv_stream = anyio.create_memory_object_stream[
111-
typing.MutableMapping[str, typing.Any]]()
111+
typing.MutableMapping[str, typing.Any]
112+
]()
112113

113114
async def receive_or_disconnect() -> Message:
114115
if response_sent.is_set():

starlette/middleware/wsgi.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ def __init__(self, app: typing.Callable, scope: Scope) -> None:
7878
self.status = None
7979
self.response_headers = None
8080
self.stream_send, self.stream_receive = anyio.create_memory_object_stream[
81-
typing.MutableMapping[str, typing.Any]](
82-
math.inf
83-
)
81+
typing.MutableMapping[str, typing.Any]
82+
](math.inf)
8483
self.response_started = False
8584
self.exc_info: typing.Any = None
8685

starlette/testclient.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,11 +746,13 @@ def reset_portal() -> None:
746746

747747
self.stream_send = StapledObjectStream(
748748
*anyio.create_memory_object_stream[
749-
typing.Optional[typing.MutableMapping[str, typing.Any]]](math.inf)
749+
typing.Optional[typing.MutableMapping[str, typing.Any]]
750+
](math.inf)
750751
)
751752
self.stream_receive = StapledObjectStream(
752753
*anyio.create_memory_object_stream[
753-
typing.MutableMapping[str, typing.Any]](math.inf)
754+
typing.MutableMapping[str, typing.Any]
755+
](math.inf)
754756
)
755757
self.task = portal.start_task_soon(self.lifespan)
756758
portal.call(self.wait_startup)

tests/test_websockets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ async def app(scope: Scope, receive: Receive, send: Send) -> None:
179179

180180

181181
def test_websocket_concurrency_pattern(test_client_factory):
182-
stream_send, stream_receive = anyio.create_memory_object_stream[MutableMapping[str, Any]]()
182+
stream_send, stream_receive = anyio.create_memory_object_stream[
183+
MutableMapping[str, Any]
184+
]()
183185

184186
async def reader(websocket):
185187
async with stream_send:

0 commit comments

Comments
 (0)