refactor: split RequestContext between server and client (#1987)

This commit is contained in:
Marcelo Trylesinski 2026-02-03 14:35:07 +01:00 • committed by GitHub
commit b1f7eec3cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -185,7 +185,7 @@ def create_client_for_transport(transport: str, server_url: str):
# Callback functions for testing
async def sampling_callback(
context: RequestContext[ClientSession, None], params: CreateMessageRequestParams
context: RequestContext[ClientSession], params: CreateMessageRequestParams
) -> CreateMessageResult:
"""Sampling callback for tests."""
return CreateMessageResult(
@ -198,7 +198,7 @@ async def sampling_callback(
)
async def elicitation_callback(context: RequestContext[ClientSession, None], params: ElicitRequestParams):
async def elicitation_callback(context: RequestContext[ClientSession], params: ElicitRequestParams):
"""Elicitation callback for tests."""
# For restaurant booking test
if "No tables available" in params.message: