Skip to content

Commit 2ddefa2

Browse files
author
Jack Yuan
committed
simplify if condition
1 parent 4b474a2 commit 2ddefa2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/strands/tools/registry.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ def register_tool(self, tool: AgentTool) -> None:
191191
)
192192

193193
# Check duplicate tool name, throw on duplicate tool names except if hot_reloading is enabled
194-
if tool.tool_name in self.registry:
195-
if not tool.supports_hot_reload:
194+
if tool.tool_name in self.registry and not tool.supports_hot_reload:
196195
raise ValueError(
197196
f"Tool name '{tool.tool_name}' already exists. Cannot register tools with exact same name."
198197
)

0 commit comments

Comments
 (0)