(self)
| 2572 | return formatter.format_help() |
| 2573 | |
| 2574 | def format_help(self): |
| 2575 | formatter = self._get_formatter() |
| 2576 | |
| 2577 | # usage |
| 2578 | formatter.add_usage(self.usage, self._actions, |
| 2579 | self._mutually_exclusive_groups) |
| 2580 | |
| 2581 | # description |
| 2582 | formatter.add_text(self.description) |
| 2583 | |
| 2584 | # positionals, optionals and user-defined groups |
| 2585 | for action_group in self._action_groups: |
| 2586 | formatter.start_section(action_group.title) |
| 2587 | formatter.add_text(action_group.description) |
| 2588 | formatter.add_arguments(action_group._group_actions) |
| 2589 | formatter.end_section() |
| 2590 | |
| 2591 | # epilog |
| 2592 | formatter.add_text(self.epilog) |
| 2593 | |
| 2594 | # determine help from format above |
| 2595 | return formatter.format_help() |
| 2596 | |
| 2597 | def _get_formatter(self): |
| 2598 | return self.formatter_class(prog=self.prog) |
no test coverage detected