docs: fix docstrings across public API surface (#2095)

This commit is contained in:
Jonathan Hefner 2026-02-18 23:45:59 -06:00 • committed by GitHub
commit c0328540c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,6 +115,7 @@ class RequestResponder(Generic[ReceiveRequestT, SendResultT]):
"""Send a response for this request.
Must be called within a context manager block.
Raises:
RuntimeError: If not used within a context manager
AssertionError: If request was already responded to
@ -235,7 +236,7 @@ class BaseSession(
metadata: MessageMetadata = None,
progress_callback: ProgressFnT | None = None,
) -> ReceiveResultT:
"""Sends a request and wait for a response.
"""Sends a request and waits for a response.
Raises an MCPError if the response contains an error. If a request read timeout is provided, it will take
precedence over the session read timeout.
@ -512,4 +513,4 @@ class BaseSession(
async def _handle_incoming(
self, req: RequestResponder[ReceiveRequestT, SendResultT] | ReceiveNotificationT | Exception
) -> None:
"""A generic handler for incoming messages. Overwritten by subclasses."""
"""A generic handler for incoming messages. Overridden by subclasses."""