fix: resolve additional mypy type errors

- Fix tool_usage.py: proper type annotations for result and fingerprint metadata
- Fix lite_agent.py: proper Union type for guardrail callable accepting both LiteAgentOutput and TaskOutput
- Add missing return type annotations to task_output_storage_handler.py methods
- Fix crew.py: replace Json generic check with str, remove unused type:ignore and redundant cast
This commit is contained in:
Greyson LaLonde
2025-09-03 23:23:36 -04:00
parent b6e7311d2d
commit eed2ffde5f
4 changed files with 12 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ class TaskOutputStorageHandler:
def __init__(self) -> None:
self.storage = KickoffTaskOutputsSQLiteStorage()
def update(self, task_index: int, log: dict[str, Any]):
def update(self, task_index: int, log: dict[str, Any]) -> None:
saved_outputs = self.load()
if saved_outputs is None:
raise ValueError("Logs cannot be None")
@@ -60,7 +60,7 @@ class TaskOutputStorageHandler:
task_index: int,
inputs: dict[str, Any] | None = None,
was_replayed: bool = False,
):
) -> None:
inputs = inputs or {}
self.storage.add(task, output, task_index, was_replayed, inputs)