fix: replace mutable default arguments with None (#3429)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled

This commit is contained in:
Greyson LaLonde
2025-08-31 18:57:45 -04:00
committed by GitHub
parent 2633b33afc
commit 1b1a8fdbf4
6 changed files with 26 additions and 17 deletions

View File

@@ -10,8 +10,10 @@ from crewai.task import Task
"""Handles storage and retrieval of task execution outputs."""
class ExecutionLog(BaseModel):
"""Represents a log entry for task execution."""
task_id: str
expected_output: Optional[str] = None
output: Dict[str, Any]
@@ -26,6 +28,7 @@ class ExecutionLog(BaseModel):
"""Manages storage and retrieval of task outputs."""
class TaskOutputStorageHandler:
def __init__(self) -> None:
self.storage = KickoffTaskOutputsSQLiteStorage()
@@ -55,9 +58,10 @@ class TaskOutputStorageHandler:
task: Task,
output: Dict[str, Any],
task_index: int,
inputs: Dict[str, Any] = {},
inputs: Dict[str, Any] | None = None,
was_replayed: bool = False,
):
inputs = inputs or {}
self.storage.add(task, output, task_index, was_replayed, inputs)
def reset(self):