From 376ac22cd70f662cefb1d963623e45cabd5e000b Mon Sep 17 00:00:00 2001 From: William Easton Date: Tue, 26 Aug 2025 19:21:05 -0500 Subject: [PATCH] PR feedback --- src/fastmcp/client/client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fastmcp/client/client.py b/src/fastmcp/client/client.py index dced79e02..2592873d7 100644 --- a/src/fastmcp/client/client.py +++ b/src/fastmcp/client/client.py @@ -54,6 +54,7 @@ from .transports import ( PythonStdioTransport, SessionKwargs, SSETransport, + StdioTransport, StreamableHttpTransport, infer_transport, ) @@ -337,15 +338,13 @@ class Client(Generic[ClientTransportT]): await fresh_client.call_tool("some_tool", {}) ``` """ - from .transports import StdioTransport - new_client = copy.copy(self) if not isinstance(self.transport, StdioTransport): # Reset session state to fresh state new_client._session_state = ClientSessionState() - new_client.name += f":{secrets.token_hex(nbytes=2)}" + new_client.name += f":{secrets.token_hex(2)}" return new_client