r"""Convert task to a sting. Args: indent (str): The ident for hierarchical tasks. state (bool): Include or not task state. Returns: str: The printable task string.
(self, indent: str = "", state: bool = False)
| 178 | return None |
| 179 | |
| 180 | def to_string(self, indent: str = "", state: bool = False) -> str: |
| 181 | r"""Convert task to a sting. |
| 182 | |
| 183 | Args: |
| 184 | indent (str): The ident for hierarchical tasks. |
| 185 | state (bool): Include or not task state. |
| 186 | |
| 187 | Returns: |
| 188 | str: The printable task string. |
| 189 | """ |
| 190 | if state: |
| 191 | _str = f"{indent}[{self.state}] Task {self.id}: {self.content}\n" |
| 192 | else: |
| 193 | _str = f"{indent}Task {self.id}: {self.content}\n" |
| 194 | for subtask in self.subtasks: |
| 195 | _str += subtask.to_string(indent + " ", state) |
| 196 | return _str |
| 197 | |
| 198 | def get_result(self, indent: str = "") -> str: |
| 199 | r"""Get task result to a sting. |
nothing calls this directly
no outgoing calls
no test coverage detected