Remove unused arg (#1382)

This commit is contained in:
Jeremiah Lowin 2025-08-06 11:09:17 -04:00 committed by GitHub
commit aedb1993a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 21 deletions

View file

@ -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 ---

View file

@ -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",

View file

@ -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."""