style: ruff format

This commit is contained in:
Greyson LaLonde
2026-04-10 07:27:53 +08:00
parent fc041354b1
commit efa8d0c5e8
3 changed files with 6 additions and 4 deletions

View File

@@ -137,7 +137,6 @@ def _parse_checkpoint_json(raw: str, source: str) -> dict[str, Any]:
}
def _format_size(size: int) -> str:
if size < 1024:
return f"{size}B"

View File

@@ -40,7 +40,6 @@ def _load_entries(location: str) -> list[dict[str, Any]]:
return _list_json(location)
def _short_id(name: str) -> str:
"""Shorten a checkpoint name for tree display."""
if len(name) > 30:
@@ -482,7 +481,9 @@ class CheckpointTUI(App[_TuiResult]):
break
for task_idx, editor_id in self._task_output_ids:
editor = self.query_one(f"#{editor_id}", TextArea)
original = str(tasks[task_idx].get("output", "")) if task_idx < len(tasks) else ""
original = (
str(tasks[task_idx].get("output", "")) if task_idx < len(tasks) else ""
)
if editor.text != original:
overrides[task_idx] = editor.text
return overrides or None

View File

@@ -440,7 +440,9 @@ class Crew(FlowTrackable, BaseModel):
if task.checkpoint_original_description is not None:
task._original_description = task.checkpoint_original_description
if task.checkpoint_original_expected_output is not None:
task._original_expected_output = task.checkpoint_original_expected_output
task._original_expected_output = (
task.checkpoint_original_expected_output
)
if self.checkpoint_inputs is not None:
self._inputs = self.checkpoint_inputs
if self.checkpoint_kickoff_event_id is not None: