Parse leftover args, which are typically tasks & per-task args. Sets ``self.parser`` to the parser used, ``self.tasks`` to the parsed per-task contexts, and ``self.core_via_tasks`` to a context holding any core flags seen within the task contexts. Also modi
(self)
| 748 | ) |
| 749 | |
| 750 | def parse_tasks(self) -> None: |
| 751 | """ |
| 752 | Parse leftover args, which are typically tasks & per-task args. |
| 753 | |
| 754 | Sets ``self.parser`` to the parser used, ``self.tasks`` to the |
| 755 | parsed per-task contexts, and ``self.core_via_tasks`` to a context |
| 756 | holding any core flags seen within the task contexts. |
| 757 | |
| 758 | Also modifies ``self.core`` to include the data from ``core_via_tasks`` |
| 759 | (so that it correctly reflects any supplied core flags regardless of |
| 760 | where they appeared). |
| 761 | |
| 762 | .. versionadded:: 1.0 |
| 763 | """ |
| 764 | self.parser = self._make_parser() |
| 765 | debug("Parsing tasks against {!r}".format(self.collection)) |
| 766 | result = self.parser.parse_argv(self.core.unparsed) |
| 767 | self.core_via_tasks = result.pop(0) |
| 768 | self._update_core_context( |
| 769 | context=self.core[0], new_args=self.core_via_tasks.args |
| 770 | ) |
| 771 | self.tasks = result |
| 772 | debug("Resulting task contexts: {!r}".format(self.tasks)) |
| 773 | |
| 774 | def print_task_help(self, name: str) -> None: |
| 775 | """ |
no test coverage detected