We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d9b85a commit 6ba5675Copy full SHA for 6ba5675
src/mcp/client/session.py
@@ -109,6 +109,8 @@ class ClientSession(
109
types.ServerNotification,
110
]
111
):
112
+ _entered: bool
113
+
114
def __init__(
115
self,
116
read_stream: MemoryObjectReceiveStream[SessionMessage | Exception],
@@ -162,9 +164,7 @@ async def __aexit__(
162
164
163
165
def _check_is_active(self) -> None:
166
if not self._entered:
- raise RuntimeError(
- "ClientSession must be used within an 'async with' block."
167
- )
+ raise RuntimeError("ClientSession must be used within an 'async with' block.")
168
169
async def initialize(self) -> types.InitializeResult:
170
self._check_is_active()
0 commit comments