Skip to content

Commit 6ba5675

Browse files
committed
Fix: Apply formatting and add type hint
1 parent 6d9b85a commit 6ba5675

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mcp/client/session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ class ClientSession(
109109
types.ServerNotification,
110110
]
111111
):
112+
_entered: bool
113+
112114
def __init__(
113115
self,
114116
read_stream: MemoryObjectReceiveStream[SessionMessage | Exception],
@@ -162,9 +164,7 @@ async def __aexit__(
162164

163165
def _check_is_active(self) -> None:
164166
if not self._entered:
165-
raise RuntimeError(
166-
"ClientSession must be used within an 'async with' block."
167-
)
167+
raise RuntimeError("ClientSession must be used within an 'async with' block.")
168168

169169
async def initialize(self) -> types.InitializeResult:
170170
self._check_is_active()

0 commit comments

Comments
 (0)