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

Method emit_examples

traitlets/config/application.py:682–693  ·  view source on GitHub ↗

Yield lines with the usage and examples. This usage string goes at the end of the command line help string and should contain examples of the application's usage.

(self)

Source from the content-addressed store, hash-verified

680 print("\n".join(self.emit_examples()))
681
682 def emit_examples(self) -> t.Generator[str, None, None]:
683 """Yield lines with the usage and examples.
684
685 This usage string goes at the end of the command line help string
686 and should contain examples of the application's usage.
687 """
688 if self.examples:
689 yield "Examples"
690 yield "--------"
691 yield ""
692 yield indent(dedent(self.examples.strip()))
693 yield ""
694
695 def print_version(self) -> None:
696 """Print the version string."""

Callers 2

emit_helpMethod · 0.95
print_examplesMethod · 0.95

Calls 1

indentFunction · 0.90

Tested by

no test coverage detected