Add ServerSessionT type var to Context (#271)

* Add ServerSessionT type var to Context

* Passing locally

* Try now
This commit is contained in:
Marcelo Trylesinski
2025-03-12 16:35:15 +01:00
committed by GitHub
parent 78fc5c12c0
commit e756315dea
5 changed files with 44 additions and 38 deletions

View File

@@ -38,7 +38,7 @@ be instantiated directly by users of the MCP framework.
"""
from enum import Enum
from typing import Any
from typing import Any, TypeVar
import anyio
import anyio.lowlevel
@@ -59,6 +59,9 @@ class InitializationState(Enum):
Initialized = 3
ServerSessionT = TypeVar("ServerSessionT", bound="ServerSession")
class ServerSession(
BaseSession[
types.ServerRequest,