Skip to content

Commit 5bcfe62

Browse files
committed
fix ruff pyright
1 parent ea8a33c commit 5bcfe62

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/mcp/client/session_group.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,7 @@ async def _establish_session(
276276
await session_stack.aclose()
277277
raise
278278

279-
async def _aggregate_components(
280-
self, server_info: types.Implementation, session: mcp.ClientSession
281-
) -> None:
279+
async def _aggregate_components(self, server_info: types.Implementation, session: mcp.ClientSession) -> None:
282280
"""Aggregates prompts, resources, and tools from a given session."""
283281

284282
# Create a reverse index so we can find all prompts, resources, and

src/mcp/client/transport_session.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ async def complete(
109109
"""Send a completion/complete request."""
110110
raise NotImplementedError
111111

112-
113-
114-
115112
@abstractmethod
116113
async def list_tools(
117114
self,

src/mcp/shared/context.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
from dataclasses import dataclass
2-
from typing import Any, Generic
2+
from typing import TYPE_CHECKING, Any, Generic
33

44
from typing_extensions import TypeVar
55

6-
from mcp.client.transport_session import ClientTransportSession
7-
from mcp.server.transport_session import ServerTransportSession
86
from mcp.shared.session import BaseSession
97
from mcp.types import RequestId, RequestParams
108

9+
if TYPE_CHECKING:
10+
from mcp.client.session import ClientTransportSession
11+
from mcp.server.session import ServerTransportSession
12+
1113
SessionT = TypeVar(
12-
"SessionT", bound=BaseSession[Any, Any, Any, Any, Any] | ClientTransportSession | ServerTransportSession
14+
"SessionT", bound=BaseSession[Any, Any, Any, Any, Any] | "ClientTransportSession" | "ServerTransportSession"
1315
)
1416
LifespanContextT = TypeVar("LifespanContextT")
1517
RequestT = TypeVar("RequestT", default=Any)

0 commit comments

Comments
 (0)