r"""Get RUNNING task.
(self)
| 169 | self.subtasks = [task for task in self.subtasks if task.id != id] |
| 170 | |
| 171 | def get_running_task(self) -> Optional["Task"]: |
| 172 | r"""Get RUNNING task.""" |
| 173 | for sub in self.subtasks: |
| 174 | if sub.state == TaskState.RUNNING: |
| 175 | return sub.get_running_task() |
| 176 | if self.state == TaskState.RUNNING: |
| 177 | return self |
| 178 | return None |
| 179 | |
| 180 | def to_string(self, indent: str = "", state: bool = False) -> str: |
| 181 | r"""Convert task to a sting. |
nothing calls this directly
no outgoing calls
no test coverage detected