Skip to content

Commit ec700a9

Browse files
style: fix additional D212 violations from recent main changes
1 parent 3954642 commit ec700a9

File tree

8 files changed

+16
-33
lines changed

8 files changed

+16
-33
lines changed

examples/clients/conformance-auth-client/mcp_conformance_auth_client/__init__.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
2-
"""
3-
MCP OAuth conformance test client.
2+
"""MCP OAuth conformance test client.
43
54
This client is designed to work with the MCP conformance test framework.
65
It automatically handles OAuth flows without user interaction by programmatically
@@ -89,8 +88,7 @@ async def set_client_info(self, client_info: OAuthClientInformationFull) -> None
8988

9089

9190
class ConformanceOAuthCallbackHandler:
92-
"""
93-
OAuth callback handler that automatically fetches the authorization URL
91+
"""OAuth callback handler that automatically fetches the authorization URL
9492
and extracts the auth code, without requiring user interaction.
9593
9694
This mimics the behavior of the TypeScript ConformanceOAuthProvider.
@@ -101,8 +99,7 @@ def __init__(self):
10199
self._state: str | None = None
102100

103101
async def handle_redirect(self, authorization_url: str) -> None:
104-
"""
105-
Fetch the authorization URL and extract the auth code from the redirect.
102+
"""Fetch the authorization URL and extract the auth code from the redirect.
106103
107104
The conformance test server returns a redirect with the auth code,
108105
so we can capture it programmatically.
@@ -148,8 +145,7 @@ async def handle_callback(self) -> tuple[str, str | None]:
148145

149146

150147
async def run_authorization_code_client(server_url: str) -> None:
151-
"""
152-
Run the conformance test client with authorization code flow.
148+
"""Run the conformance test client with authorization code flow.
153149
154150
This function:
155151
1. Connects to the MCP server with OAuth authorization code flow
@@ -180,8 +176,7 @@ async def run_authorization_code_client(server_url: str) -> None:
180176

181177

182178
async def run_client_credentials_jwt_client(server_url: str) -> None:
183-
"""
184-
Run the conformance test client with client credentials flow using private_key_jwt (SEP-1046).
179+
"""Run the conformance test client with client credentials flow using private_key_jwt (SEP-1046).
185180
186181
This function:
187182
1. Connects to the MCP server with OAuth client_credentials grant
@@ -223,8 +218,7 @@ async def run_client_credentials_jwt_client(server_url: str) -> None:
223218

224219

225220
async def run_client_credentials_basic_client(server_url: str) -> None:
226-
"""
227-
Run the conformance test client with client credentials flow using client_secret_basic.
221+
"""Run the conformance test client with client credentials flow using client_secret_basic.
228222
229223
This function:
230224
1. Connects to the MCP server with OAuth client_credentials grant

examples/clients/simple-auth-client/mcp_simple_auth_client/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
2-
"""
3-
Simple MCP client example with OAuth authentication support.
2+
"""Simple MCP client example with OAuth authentication support.
43
54
This client connects to an MCP server using streamable HTTP transport with OAuth.
65

examples/clients/sse-polling-client/mcp_sse_polling_client/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
SSE Polling Demo Client
1+
"""SSE Polling Demo Client
32
43
Demonstrates the client-side auto-reconnect for SSE polling pattern.
54

examples/servers/everything-server/mcp_everything_server/server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
2-
"""
3-
MCP Everything Server - Conformance Test Server
2+
"""MCP Everything Server - Conformance Test Server
43
54
Server implementing all MCP features for conformance testing based on Conformance Server Specification.
65
"""

examples/servers/simple-pagination/mcp_simple_pagination/server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
Simple MCP server demonstrating pagination for tools, resources, and prompts.
1+
"""Simple MCP server demonstrating pagination for tools, resources, and prompts.
32
43
This example shows how to use the paginated decorators to handle large lists
54
of items that need to be split across multiple pages.

examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/event_store.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
In-memory event store for demonstrating resumability functionality.
1+
"""In-memory event store for demonstrating resumability functionality.
32
43
This is a simple implementation intended for examples and testing,
54
not for production use where a persistent storage solution would be more appropriate.
@@ -18,18 +17,15 @@
1817

1918
@dataclass
2019
class EventEntry:
21-
"""
22-
Represents an event entry in the event store.
23-
"""
20+
"""Represents an event entry in the event store."""
2421

2522
event_id: EventId
2623
stream_id: StreamId
2724
message: JSONRPCMessage | None
2825

2926

3027
class InMemoryEventStore(EventStore):
31-
"""
32-
Simple in-memory implementation of the EventStore interface for resumability.
28+
"""Simple in-memory implementation of the EventStore interface for resumability.
3329
This is primarily intended for examples and testing, not for production use
3430
where a persistent storage solution would be more appropriate.
3531

examples/servers/sse-polling-demo/mcp_sse_polling_demo/event_store.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
In-memory event store for demonstrating resumability functionality.
1+
"""In-memory event store for demonstrating resumability functionality.
32
43
This is a simple implementation intended for examples and testing,
54
not for production use where a persistent storage solution would be more appropriate.
@@ -26,8 +25,7 @@ class EventEntry:
2625

2726

2827
class InMemoryEventStore(EventStore):
29-
"""
30-
Simple in-memory implementation of the EventStore interface for resumability.
28+
"""Simple in-memory implementation of the EventStore interface for resumability.
3129
This is primarily intended for examples and testing, not for production use
3230
where a persistent storage solution would be more appropriate.
3331

examples/servers/sse-polling-demo/mcp_sse_polling_demo/server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
SSE Polling Demo Server
1+
"""SSE Polling Demo Server
32
43
Demonstrates the SSE polling pattern with close_sse_stream() for long-running tasks.
54

0 commit comments

Comments
 (0)