mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user