chore: add D212 lint rule to enforce Google-style docstrings (#1892)
This commit is contained in:
parent
df039bf97c
commit
d41d0c0128
13 changed files with 452 additions and 925 deletions
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
FastMCP Complex inputs Example
|
||||
"""FastMCP Complex inputs Example
|
||||
|
||||
Demonstrates validation via pydantic with complex models.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
FastMCP Desktop Example
|
||||
"""FastMCP Desktop Example
|
||||
|
||||
A simple example that exposes the desktop directory as a resource.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"""
|
||||
FastMCP Echo Server with direct CallToolResult return
|
||||
"""
|
||||
"""FastMCP Echo Server with direct CallToolResult return"""
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"""
|
||||
FastMCP Echo Server
|
||||
"""
|
||||
"""FastMCP Echo Server"""
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
FastMCP Icons Demo Server
|
||||
"""FastMCP Icons Demo Server
|
||||
|
||||
Demonstrates using icons with tools, resources, prompts, and implementation.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"""
|
||||
FastMCP Echo Server that sends log messages and progress updates to the client
|
||||
"""
|
||||
"""FastMCP Echo Server that sends log messages and progress updates to the client"""
|
||||
|
||||
import asyncio
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
# uv pip install 'pydantic-ai-slim[openai]' asyncpg numpy pgvector
|
||||
|
||||
"""
|
||||
Recursive memory system inspired by the human brain's clustering of memories.
|
||||
"""Recursive memory system inspired by the human brain's clustering of memories.
|
||||
Uses OpenAI's 'text-embedding-3-small' model and pgvector for efficient
|
||||
similarity search.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"""
|
||||
FastMCP Example showing parameter descriptions
|
||||
"""
|
||||
"""FastMCP Example showing parameter descriptions"""
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
FastMCP Screenshot Example
|
||||
"""FastMCP Screenshot Example
|
||||
|
||||
Give Claude a tool to capture and view screenshots.
|
||||
"""
|
||||
|
|
@ -15,8 +14,7 @@ mcp = FastMCP("Screenshot Demo")
|
|||
|
||||
@mcp.tool()
|
||||
def take_screenshot() -> Image:
|
||||
"""
|
||||
Take a screenshot of the user's screen and return it as an image. Use
|
||||
"""Take a screenshot of the user's screen and return it as an image. Use
|
||||
this tool anytime the user wants you to look at something they're doing.
|
||||
"""
|
||||
import pyautogui
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"""
|
||||
FastMCP Echo Server
|
||||
"""
|
||||
"""FastMCP Echo Server"""
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
# dependencies = []
|
||||
# ///
|
||||
|
||||
"""
|
||||
FastMCP Text Me Server
|
||||
"""FastMCP Text Me Server
|
||||
--------------------------------
|
||||
This defines a simple FastMCP server that sends a text message to a phone number via https://surgemsg.com/.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
Example FastMCP server that uses Unicode characters in various places to help test
|
||||
"""Example FastMCP server that uses Unicode characters in various places to help test
|
||||
Unicode handling in tools and inspectors.
|
||||
"""
|
||||
|
||||
|
|
@ -10,8 +9,7 @@ mcp = FastMCP()
|
|||
|
||||
@mcp.tool(description="🌟 A tool that uses various Unicode characters in its description: á é í ó ú ñ 漢字 🎉")
|
||||
def hello_unicode(name: str = "世界", greeting: str = "¡Hola") -> str:
|
||||
"""
|
||||
A simple tool that demonstrates Unicode handling in:
|
||||
"""A simple tool that demonstrates Unicode handling in:
|
||||
- Tool description (emojis, accents, CJK characters)
|
||||
- Parameter defaults (CJK characters)
|
||||
- Return values (Spanish punctuation, emojis)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"""
|
||||
FastMCP Weather Example with Structured Output
|
||||
"""FastMCP Weather Example with Structured Output
|
||||
|
||||
Demonstrates how to use structured output with tools to return
|
||||
well-typed, validated data that clients can easily process.
|
||||
|
|
|
|||
Loading…
Reference in a new issue