Use proper generic for Context (#245)

This commit is contained in:
Marcelo Trylesinski 2025-03-11 14:15:07 +01:00 • committed by GitHub
commit 5cbea24ecb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,11 +1,13 @@
from dataclasses import dataclass
from typing import Generic, TypeVar
from typing import Any, Generic
from typing_extensions import TypeVar
from mcp.shared.session import BaseSession
from mcp.types import RequestId, RequestParams
SessionT = TypeVar("SessionT", bound=BaseSession)
LifespanContextT = TypeVar("LifespanContextT")
SessionT = TypeVar("SessionT", bound=BaseSession[Any, Any, Any, Any, Any])
LifespanContextT = TypeVar("LifespanContextT", default=None)
@dataclass