Skip to content

Commit b489d30

Browse files
committed
run precommit
1 parent 0aa5a45 commit b489d30

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/mcp/server/streaming_asgi_transport.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ async def process_messages() -> None:
176176
response_complete.set()
177177
await content_send_channel.aclose()
178178

179-
180179
# Create tasks for running the app and processing messages
181180
self.task_group.start_soon(run_app)
182181
self.task_group.start_soon(process_messages)

tests/shared/test_sse.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,13 @@ def context_server(server_port: int) -> Generator[None, None, None]:
368368
if proc.is_alive():
369369
print("context server process failed to terminate")
370370

371+
371372
@pytest.fixture()
372373
async def context_app() -> Starlette:
373374
"""Fixture that provides the context server app"""
374375
security_settings = TransportSecuritySettings(
375-
allowed_hosts=["127.0.0.1:*", "localhost:*", "testserver"],
376-
allowed_origins=["http://127.0.0.1:*", "http://localhost:*", "http://testserver"]
376+
allowed_hosts=["127.0.0.1:*", "localhost:*", "testserver"],
377+
allowed_origins=["http://127.0.0.1:*", "http://localhost:*", "http://testserver"],
377378
)
378379
sse = SseServerTransport("/messages/", security_settings=security_settings)
379380
context_server = RequestContextServer()
@@ -403,6 +404,7 @@ async def test_request_context_propagation(context_app: Starlette) -> None:
403404
}
404405

405406
async with anyio.create_task_group() as tg:
407+
406408
def create_test_client(
407409
headers: dict[str, str] | None = None,
408410
timeout: httpx.Timeout | None = None,
@@ -418,10 +420,12 @@ def create_test_client(
418420
follow_redirects=True,
419421
)
420422

421-
async with sse_client("http://testserver/sse",
422-
headers=custom_headers,
423-
httpx_client_factory=create_test_client,
424-
sse_read_timeout=0.5) as (
423+
async with sse_client(
424+
"http://testserver/sse",
425+
headers=custom_headers,
426+
httpx_client_factory=create_test_client,
427+
sse_read_timeout=0.5,
428+
) as (
425429
read_stream,
426430
write_stream,
427431
):

0 commit comments

Comments
 (0)