diff --git a/examples/in_memory_proxy_example.py b/examples/in_memory_proxy_example.py index 760ba579e..305e9aba2 100644 --- a/examples/in_memory_proxy_example.py +++ b/examples/in_memory_proxy_example.py @@ -38,9 +38,7 @@ async def main(): # 2. Proxy Server Creation print("\nStep 2: Creating the Proxy Server (InMemoryProxy)...") - print( - f" (Using create_proxy to wrap '{original_server.name}' directly)" - ) + print(f" (Using create_proxy to wrap '{original_server.name}' directly)") proxy_server = create_proxy(original_server, name="InMemoryProxy") print( f" -> Proxy Server '{proxy_server.name}' created, proxying '{original_server.name}'." diff --git a/fastmcp_slim/fastmcp/server/server.py b/fastmcp_slim/fastmcp/server/server.py index a7ccba6cc..ed0112256 100644 --- a/fastmcp_slim/fastmcp/server/server.py +++ b/fastmcp_slim/fastmcp/server/server.py @@ -5,7 +5,6 @@ from __future__ import annotations import asyncio import logging import secrets -import warnings from collections.abc import ( AsyncIterator, Callable, diff --git a/tests/client/test_stdio.py b/tests/client/test_stdio.py index 0b2b56364..af4995203 100644 --- a/tests/client/test_stdio.py +++ b/tests/client/test_stdio.py @@ -7,7 +7,7 @@ import weakref import psutil import pytest -from fastmcp import Client, FastMCP +from fastmcp import Client from fastmcp.client.transports import PythonStdioTransport, StdioTransport diff --git a/tests/server/mount/test_mount.py b/tests/server/mount/test_mount.py index 0ae383a1c..5f099a352 100644 --- a/tests/server/mount/test_mount.py +++ b/tests/server/mount/test_mount.py @@ -273,9 +273,7 @@ class TestMultipleServerMount: ) # Create a proxy server that will fail to connect - unreachable_proxy = create_proxy( - unreachable_client, name="unreachable_proxy" - ) + unreachable_proxy = create_proxy(unreachable_client, name="unreachable_proxy") # Mount the unreachable proxy main_app.mount(unreachable_proxy, "unreachable") diff --git a/tests/server/providers/proxy/test_proxy_client.py b/tests/server/providers/proxy/test_proxy_client.py index 594642a78..216d283e8 100644 --- a/tests/server/providers/proxy/test_proxy_client.py +++ b/tests/server/providers/proxy/test_proxy_client.py @@ -12,11 +12,11 @@ from mcp_types import ( from pydantic import BaseModel, Field from fastmcp import Client, Context, FastMCP -from fastmcp.server import create_proxy from fastmcp.client.elicitation import ElicitRequestParams, ElicitResult from fastmcp.client.logging import LogMessage from fastmcp.client.sampling import RequestContext, SamplingMessage, SamplingParams from fastmcp.exceptions import ToolError +from fastmcp.server import create_proxy from fastmcp.server.elicitation import AcceptedElicitation from fastmcp.server.providers.proxy import ProxyClient, _create_client_factory