Skip to content

Commit f660cc1

Browse files
committed
Some more tweaks
1 parent f3124c0 commit f660cc1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pydantic_ai_slim/pydantic_ai/mcp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ async def call_tool(
163163
return content[0] if len(content) == 1 else content
164164

165165
async def prepare_for_run(self, ctx: RunContext[Any]) -> RunToolset[Any]:
166-
frozen_self = RunToolset(self, ctx, await self.list_tool_defs())
167-
frozen_toolset = frozen_self
166+
frozen_toolset = RunToolset(self, ctx, await self.list_tool_defs())
168167
if self.process_tool_call:
169168
frozen_toolset = await ProcessedToolset(frozen_toolset, self.process_tool_call).prepare_for_run(ctx)
170169
if self.tool_prefix:

pydantic_ai_slim/pydantic_ai/toolsets/individually_prepared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async def prepare_for_run(self, ctx: RunContext[AgentDepsT]) -> RunToolset[Agent
3333
new_name = tool_def.name
3434
if new_name in tool_defs:
3535
if new_name != original_name:
36-
raise UserError(f"Renaming tool '{original_name}' to '{new_name}' conflicts with existing tool.")
36+
raise UserError(f'Renaming tool {original_name!r} to {new_name!r} conflicts with existing tool.')
3737
else:
3838
raise UserError(f'Tool name conflicts with previously renamed tool: {new_name!r}.')
3939
name_map[new_name] = original_name

0 commit comments

Comments
 (0)