Skip to content

Commit d09207b

Browse files
committed
fix: formatting errors
1 parent c779cb2 commit d09207b

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/mcp/server/fastmcp/prompts/manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def add_prompt(
3535
Args:
3636
prompt_or_fn: Either a Prompt instance or a function to create a prompt from
3737
name: Optional name for the prompt (only used if prompt_or_fn is a function)
38-
description: Optional description of the prompt (only used if prompt_or_fn is a function)
38+
description: Optional description of the prompt
39+
(only used if prompt_or_fn is a function)
3940
"""
4041
if isinstance(prompt_or_fn, Prompt):
4142
prompt = prompt_or_fn

src/mcp/server/fastmcp/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ def add_prompt(
500500
Args:
501501
prompt_or_fn: Either a Prompt instance or a function to create a prompt from
502502
name: Optional name for the prompt (only used if prompt_or_fn is a function)
503-
description: Optional description of the prompt (only used if prompt_or_fn is a function)
503+
description: Optional description of the prompt
504+
(only used if prompt_or_fn is a function)
504505
"""
505506
self._prompt_manager.add_prompt(
506507
prompt_or_fn, name=name, description=description

tests/server/fastmcp/prompts/test_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def fn() -> str:
3030
assert manager.get_prompt("test_prompt") == prompt
3131

3232
def test_add_prompt_object_ignores_name_and_description(self):
33-
"""Test that name and description args are ignored when adding a Prompt object."""
33+
"""Test if name and description args are ignored when adding a Prompt object."""
3434

3535
def fn() -> str:
3636
return "Hello, world!"

tests/server/fastmcp/test_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from mcp.server.fastmcp.prompts.base import (
1212
EmbeddedResource,
1313
Message,
14-
UserMessage,
1514
Prompt,
15+
UserMessage,
1616
)
1717
from mcp.server.fastmcp.resources import FileResource, FunctionResource
1818
from mcp.server.fastmcp.utilities.types import Image

0 commit comments

Comments
 (0)