Skip to content

Commit 805ef93

Browse files
style: ruff format jsonl_parser and tool_dispatch
1 parent e72280e commit 805ef93

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

utils/jsonl_parser.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,7 @@ def _process_user(
175175
images = _extract_images(content)
176176

177177
raw_tool_result = entry.get("toolUseResult")
178-
tool_result: ToolResultUnion | None = (
179-
raw_tool_result if raw_tool_result is not None else None
180-
)
178+
tool_result: ToolResultUnion | None = raw_tool_result if raw_tool_result is not None else None
181179
tool_result_parsed = _parse_tool_result(tool_result, entry.get("slug"))
182180

183181
# Also extract images from toolUseResult content (e.g., Read tool on image files)

utils/tool_dispatch.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def _tool_result_build_bash(tr: ToolResultDict, base: dict[str, object]) -> dict
3131

3232

3333
def _tool_result_pred_file_edit(tr: ToolResultDict) -> bool:
34-
return "structuredPatch" in tr or (
35-
"filePath" in tr and "newString" in tr
36-
)
34+
return "structuredPatch" in tr or ("filePath" in tr and "newString" in tr)
3735

3836

3937
def _tool_result_build_file_edit(tr: ToolResultDict, base: dict[str, object]) -> dict[str, object]:

0 commit comments

Comments
 (0)