Skip to content

Commit eb45f9f

Browse files
committed
chore: ruff and lint
1 parent 80fcba9 commit eb45f9f

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

examples/run_evaluation.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async def run_single_task(
121121
model=model,
122122
allowed_tools=allowed_tools,
123123
)
124-
print( "Task prompt: ", task.prompt)
124+
print("Task prompt: ", task.prompt)
125125
result = await agent.run(task, max_steps=max_steps)
126126
print("✅ Reward:", result.reward)
127127

@@ -269,7 +269,10 @@ def parse_args() -> argparse.Namespace: # type: ignore[valid-type]
269269
"--verbose", "-v", action="store_true", help="Show detailed agent step logs"
270270
)
271271
parser.add_argument(
272-
"--very-verbose", "-vv", action="store_true", help="Show debug-level logs for maximum visibility"
272+
"--very-verbose",
273+
"-vv",
274+
action="store_true",
275+
help="Show debug-level logs for maximum visibility",
273276
)
274277

275278
return parser.parse_args()

hud/agents/base.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ async def _filter_tools(self) -> None:
556556

557557
all_tools = await self.mcp_client.list_tools()
558558

559-
560559
response_tools_by_server: dict[str, str] = {} # server_name -> tool_name
561560
for tool in all_tools:
562561
if "response" in tool.name or tool.name == "response":
@@ -579,7 +578,9 @@ async def _filter_tools(self) -> None:
579578
for server_name in reversed(server_names):
580579
if server_name in response_tools_by_server:
581580
response_tool_name = response_tools_by_server[server_name]
582-
self.console.debug(f"Found response tool '{response_tool_name}' from server '{server_name}'")
581+
self.console.debug(
582+
f"Found response tool '{response_tool_name}' from server '{server_name}'"
583+
)
583584
break
584585

585586
# Fallback to any response tool
@@ -593,10 +594,12 @@ async def _filter_tools(self) -> None:
593594
self.response_tool_name = response_tool_name
594595
self.lifecycle_tools.append(response_tool_name)
595596
elif response_tool_name:
596-
self.console.debug(f"Response tool '{response_tool_name}' already in lifecycle_tools")
597+
self.console.debug(
598+
f"Response tool '{response_tool_name}' already in lifecycle_tools"
599+
)
597600
self.response_tool_name = response_tool_name
598601
else:
599-
self.console.debug(f"No response tools found or no mcp_config")
602+
self.console.debug("No response tools found or no mcp_config")
600603

601604
# Filter tools
602605
self._available_tools = []
@@ -610,7 +613,7 @@ async def _filter_tools(self) -> None:
610613
for tool in all_tools:
611614
# Lifecycle tools (setup, evaluate, response) should always be included
612615
is_lifecycle = tool.name in self.lifecycle_tools
613-
616+
614617
# Check if tool should be included
615618
if not is_lifecycle:
616619
if self.allowed_tools and tool.name not in self.allowed_tools:
@@ -620,7 +623,9 @@ async def _filter_tools(self) -> None:
620623
self.console.debug(f"Skipping tool '{tool.name}' - in disallowed_tools")
621624
continue
622625

623-
self.console.debug(f"Adding tool '{tool.name}' to available tools (lifecycle={is_lifecycle})")
626+
self.console.debug(
627+
f"Adding tool '{tool.name}' to available tools (lifecycle={is_lifecycle})"
628+
)
624629
self._available_tools.append(tool)
625630
self._tool_map[tool.name] = tool
626631

hud/agents/misc/response_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, api_key: str | None = None, model: str = "gpt-4o") -> None:
3434
3535
- STOP: If the agent indicates it has successfully completed a task, even if phrased as a question
3636
like "I have entered the right values into this form. Would you like me to do anything else?"
37-
or "Here is the website. Is there any other information you need?" or if the agent has
37+
or "Here is the website. Is there any other information you need?" or if the agent has
3838
strongly determined it wants to stop the task.
3939
4040
- CONTINUE: If the agent is asking for clarification before proceeding with a task

0 commit comments

Comments
 (0)