mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
Remove unused arg (#1382)
This commit is contained in:
parent
1ade5ddb05
commit
aedb1993a2
3 changed files with 5 additions and 21 deletions
|
|
@ -140,19 +140,18 @@ class FastMCP(Generic[LifespanResultT]):
|
|||
]
|
||||
| None
|
||||
) = None,
|
||||
tool_serializer: Callable[[Any], str] | None = None,
|
||||
cache_expiration_seconds: float | None = None,
|
||||
on_duplicate_tools: DuplicateBehavior | None = None,
|
||||
on_duplicate_resources: DuplicateBehavior | None = None,
|
||||
on_duplicate_prompts: DuplicateBehavior | None = None,
|
||||
dependencies: list[str] | None = None,
|
||||
resource_prefix_format: Literal["protocol", "path"] | None = None,
|
||||
mask_error_details: bool | None = None,
|
||||
tools: list[Tool | Callable[..., Any]] | None = None,
|
||||
tool_transformations: dict[str, ToolTransformConfig] | None = None,
|
||||
dependencies: list[str] | None = None,
|
||||
tool_serializer: Callable[[Any], str] | None = None,
|
||||
include_tags: set[str] | None = None,
|
||||
exclude_tags: set[str] | None = None,
|
||||
include_fastmcp_meta: bool | None = None,
|
||||
on_duplicate_tools: DuplicateBehavior | None = None,
|
||||
on_duplicate_resources: DuplicateBehavior | None = None,
|
||||
on_duplicate_prompts: DuplicateBehavior | None = None,
|
||||
# ---
|
||||
# ---
|
||||
# --- The following arguments are DEPRECATED ---
|
||||
|
|
|
|||
|
|
@ -176,7 +176,6 @@ class TestDeprecatedServerInitKwargs:
|
|||
server = FastMCP(
|
||||
name="TestServer",
|
||||
instructions="Test instructions",
|
||||
cache_expiration_seconds=60.0,
|
||||
on_duplicate_tools="warn",
|
||||
on_duplicate_resources="error",
|
||||
on_duplicate_prompts="replace",
|
||||
|
|
|
|||
|
|
@ -637,23 +637,9 @@ class TestDynamicChanges:
|
|||
sub_app._tool_manager._tools.pop("temp_tool")
|
||||
|
||||
# The tool should no longer be accessible
|
||||
# Refresh the cache by clearing it
|
||||
tools = await main_app.get_tools()
|
||||
assert "sub_temp_tool" not in tools
|
||||
|
||||
async def test_cache_expiration(self):
|
||||
main_app = FastMCP("MainApp", cache_expiration_seconds=2)
|
||||
sub_app = FastMCP("SubApp")
|
||||
tools = await main_app.get_tools()
|
||||
assert len(tools) == 0
|
||||
|
||||
@sub_app.tool
|
||||
def sub_tool():
|
||||
return "sub_tool"
|
||||
|
||||
tools = await main_app.get_tools()
|
||||
assert len(tools) == 0
|
||||
|
||||
|
||||
class TestResourcesAndTemplates:
|
||||
"""Test mounting with resources and resource templates."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue