r"""self.tasks and self.task_map will be updated by the input tasks.
(self, tasks: Union[Task, List[Task]])
| 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, |
nothing calls this directly
no test coverage detected