Skip to content

Commit 92dff29

Browse files
committed
fix(test): use explicit import for anyio.lowlevel.checkpoint
Import checkpoint directly from anyio.lowlevel to fix pyright reportAttributeAccessIssue on the lazy submodule.
1 parent 04c7535 commit 92dff29

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/server/test_multi_tenancy_session.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import anyio
66
import pytest
7+
from anyio.lowlevel import checkpoint
78

89
from mcp import Client
910
from mcp.server import Server
@@ -281,7 +282,7 @@ async def simulate_request(tenant_id: str, request_key: str) -> None:
281282
try:
282283
# Yield control to allow other tasks to run. This is the critical
283284
# point where context leakage could occur if isolation is broken.
284-
await anyio.lowlevel.checkpoint()
285+
await checkpoint()
285286

286287
# Read back the tenant_id - should still be our tenant, not the other
287288
results[request_key] = tenant_id_var.get()

0 commit comments

Comments
 (0)