chore: add D212 lint rule to enforce Google-style docstrings (#1892)

This commit is contained in:
Felix Weinberger 2026-01-16 16:10:52 +00:00 • committed by GitHub
commit d41d0c0128
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,8 +16,7 @@ from mcp.shared.message import SessionMessage
class InMemoryTransport:
"""
In-memory transport for testing MCP servers without network overhead.
"""In-memory transport for testing MCP servers without network overhead.
This transport starts the server in a background task and provides
streams for client-side communication. The server is automatically
@ -43,8 +42,7 @@ class InMemoryTransport:
*,
raise_exceptions: bool = False,
) -> None:
"""
Initialize the in-memory transport.
"""Initialize the in-memory transport.
Args:
server: The MCP server to connect to (Server or FastMCP instance)
@ -63,8 +61,7 @@ class InMemoryTransport:
],
None,
]:
"""
Connect to the server and return streams for communication.
"""Connect to the server and return streams for communication.
Yields:
A tuple of (read_stream, write_stream) for bidirectional communication