MCPcopy Create free account
hub / github.com/ipython/traitlets / emit_subcommands_help

Method emit_subcommands_help

traitlets/config/application.py:603–618  ·  view source on GitHub ↗

Yield the lines for the subcommand part of the help.

(self)

Source from the content-addressed store, hash-verified

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.

Callers 2

print_subcommandsMethod · 0.95
emit_helpMethod · 0.95

Calls 3

wrap_paragraphsFunction · 0.90
indentFunction · 0.90
formatMethod · 0.80

Tested by

no test coverage detected