chore: add D212 lint rule to enforce Google-style docstrings (#1892)
This commit is contained in:
parent
df039bf97c
commit
d41d0c0128
19 changed files with 452 additions and 925 deletions
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
cd to the `examples/snippets` directory and run:
|
||||
uv run completion-client
|
||||
"""cd to the `examples/snippets` directory and run:
|
||||
uv run completion-client
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
cd to the `examples/snippets` directory and run:
|
||||
uv run display-utilities-client
|
||||
"""cd to the `examples/snippets` directory and run:
|
||||
uv run display-utilities-client
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
Before running, specify running MCP RS server URL.
|
||||
"""Before running, specify running MCP RS server URL.
|
||||
To spin up RS server locally, see
|
||||
examples/servers/simple-auth/README.md
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"""
|
||||
Example of consuming paginated MCP endpoints from a client.
|
||||
"""
|
||||
"""Example of consuming paginated MCP endpoints from a client."""
|
||||
|
||||
import asyncio
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
cd to the `examples/snippets/clients` directory and run:
|
||||
uv run client
|
||||
"""cd to the `examples/snippets/clients` directory and run:
|
||||
uv run client
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
Run from the repository root:
|
||||
uv run examples/snippets/clients/streamable_basic.py
|
||||
"""Run from the repository root:
|
||||
uv run examples/snippets/clients/streamable_basic.py
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
FastMCP quickstart example.
|
||||
"""FastMCP quickstart example.
|
||||
|
||||
Run from the repository root:
|
||||
uv run examples/snippets/servers/fastmcp_quickstart.py
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
Run from the repository root:
|
||||
"""Run from the repository root:
|
||||
uv run examples/snippets/servers/lowlevel/basic.py
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
Run from the repository root:
|
||||
uv run examples/snippets/servers/lowlevel/direct_call_tool_result.py
|
||||
"""Run from the repository root:
|
||||
uv run examples/snippets/servers/lowlevel/direct_call_tool_result.py
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
Run from the repository root:
|
||||
uv run examples/snippets/servers/lowlevel/lifespan.py
|
||||
"""Run from the repository root:
|
||||
uv run examples/snippets/servers/lowlevel/lifespan.py
|
||||
"""
|
||||
|
||||
from collections.abc import AsyncIterator
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
Run from the repository root:
|
||||
uv run examples/snippets/servers/lowlevel/structured_output.py
|
||||
"""Run from the repository root:
|
||||
uv run examples/snippets/servers/lowlevel/structured_output.py
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
Run from the repository root:
|
||||
uv run examples/snippets/servers/oauth_server.py
|
||||
"""Run from the repository root:
|
||||
uv run examples/snippets/servers/oauth_server.py
|
||||
"""
|
||||
|
||||
from pydantic import AnyHttpUrl
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"""
|
||||
Example of implementing pagination with MCP server decorators.
|
||||
"""
|
||||
"""Example of implementing pagination with MCP server decorators."""
|
||||
|
||||
import mcp.types as types
|
||||
from mcp.server.lowlevel import Server
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
Run from the repository root:
|
||||
uv run examples/snippets/servers/streamable_config.py
|
||||
"""Run from the repository root:
|
||||
uv run examples/snippets/servers/streamable_config.py
|
||||
"""
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
Basic example showing how to mount StreamableHTTP server in Starlette.
|
||||
"""Basic example showing how to mount StreamableHTTP server in Starlette.
|
||||
|
||||
Run from the repository root:
|
||||
uvicorn examples.snippets.servers.streamable_http_basic_mounting:app --reload
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
Example showing how to mount StreamableHTTP server using Host-based routing.
|
||||
"""Example showing how to mount StreamableHTTP server using Host-based routing.
|
||||
|
||||
Run from the repository root:
|
||||
uvicorn examples.snippets.servers.streamable_http_host_mounting:app --reload
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
Example showing how to mount multiple StreamableHTTP servers with path configuration.
|
||||
"""Example showing how to mount multiple StreamableHTTP servers with path configuration.
|
||||
|
||||
Run from the repository root:
|
||||
uvicorn examples.snippets.servers.streamable_http_multiple_servers:app --reload
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
Example showing path configuration when mounting FastMCP.
|
||||
"""Example showing path configuration when mounting FastMCP.
|
||||
|
||||
Run from the repository root:
|
||||
uvicorn examples.snippets.servers.streamable_http_path_config:app --reload
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"""
|
||||
Run from the repository root:
|
||||
uvicorn examples.snippets.servers.streamable_starlette_mount:app --reload
|
||||
"""Run from the repository root:
|
||||
uvicorn examples.snippets.servers.streamable_starlette_mount:app --reload
|
||||
"""
|
||||
|
||||
import contextlib
|
||||
|
|
|
|||
Loading…
Reference in a new issue