Skip to content

Commit ebddf70

Browse files
committed
Rename tool_id to job_tool_id in the job branch of _format_interface_context
mypy complained about the variable being re-typed: the tool branch assigns tool_id = _s(...) (str), and the job branch was reassigning tool_id = ctx.get("toolId") (Any | None) in the same function scope. Give the job variant a distinct name -- the two mean different things anyway (tool being viewed vs. tool that produced the job).
1 parent 7b08d1a commit ebddf70

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/galaxy/agents/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ def _format_interface_context(self, ctx: dict[str, Any]) -> str:
356356

357357
if ctx_type == "job":
358358
job_id = _s(ctx.get("jobId", "unknown"))
359-
tool_id = ctx.get("toolId")
360-
tool_str = f" (tool: {_s(tool_id)})" if tool_id else ""
359+
job_tool_id = ctx.get("toolId")
360+
tool_str = f" (tool: {_s(job_tool_id)})" if job_tool_id else ""
361361
return f"The user is viewing job {job_id}{tool_str}."
362362

363363
return f"The user is viewing: {_s(ctx_type)}"

0 commit comments

Comments
 (0)