Returns all contained tasks and subtasks as a list of parser contexts. :param bool ignore_unknown_help: Passed on to each task's ``get_arguments()`` method. See the config option by the same name for details. .. versionadded:: 1.0 .. version
(
self, ignore_unknown_help: Optional[bool] = None
)
| 421 | return False |
| 422 | |
| 423 | def to_contexts( |
| 424 | self, ignore_unknown_help: Optional[bool] = None |
| 425 | ) -> List[ParserContext]: |
| 426 | """ |
| 427 | Returns all contained tasks and subtasks as a list of parser contexts. |
| 428 | |
| 429 | :param bool ignore_unknown_help: |
| 430 | Passed on to each task's ``get_arguments()`` method. See the config |
| 431 | option by the same name for details. |
| 432 | |
| 433 | .. versionadded:: 1.0 |
| 434 | .. versionchanged:: 1.7 |
| 435 | Added the ``ignore_unknown_help`` kwarg. |
| 436 | """ |
| 437 | result = [] |
| 438 | for primary, aliases in self.task_names.items(): |
| 439 | task = self[primary] |
| 440 | result.append( |
| 441 | ParserContext( |
| 442 | name=primary, |
| 443 | aliases=aliases, |
| 444 | args=task.get_arguments( |
| 445 | ignore_unknown_help=ignore_unknown_help |
| 446 | ), |
| 447 | ) |
| 448 | ) |
| 449 | return result |
| 450 | |
| 451 | def subtask_name(self, collection_name: str, task_name: str) -> str: |
| 452 | return ".".join( |
no test coverage detected