Yield the lines for the subcommand part of the help.
(self)
| 601 | print("\n".join(self.emit_subcommands_help())) |
| 602 | |
| 603 | def emit_subcommands_help(self) -> t.Generator[str, None, None]: |
| 604 | """Yield the lines for the subcommand part of the help.""" |
| 605 | if not self.subcommands: |
| 606 | return |
| 607 | |
| 608 | header = "Subcommands" |
| 609 | yield header |
| 610 | yield "=" * len(header) |
| 611 | for p in wrap_paragraphs(self.subcommand_description.format(app=self.name)): |
| 612 | yield p |
| 613 | yield "" |
| 614 | for subc, (_, help) in self.subcommands.items(): |
| 615 | yield subc |
| 616 | if help: |
| 617 | yield indent(dedent(help.strip())) |
| 618 | yield "" |
| 619 | |
| 620 | def emit_help_epilogue(self, classes: bool) -> t.Generator[str, None, None]: |
| 621 | """Yield the very bottom lines of the help message. |
no test coverage detected