MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / add_tasks

Method add_tasks

camel/tasks/task.py:384–393  ·  view source on GitHub ↗

r"""self.tasks and self.task_map will be updated by the input tasks.

(self, tasks: Union[Task, List[Task]])

Source from the content-addressed store, hash-verified

382 parent = child
383
384 def add_tasks(self, tasks: Union[Task, List[Task]]) -> None:
385 r"""self.tasks and self.task_map will be updated by the input tasks."""
386 if not tasks:
387 return
388 if not isinstance(tasks, List):
389 tasks = [tasks]
390 for task in tasks:
391 assert not self.exist(task.id), f"`{task.id}` already existed."
392 self.tasks = self.topological_sort(self.tasks + tasks)
393 self.task_map = {task.id: task for task in self.tasks}
394
395 def evolve(
396 self,

Callers

nothing calls this directly

Calls 2

existMethod · 0.95
topological_sortMethod · 0.95

Tested by

no test coverage detected