MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / print_help

Method print_help

cmd2/argparse_utils.py:652–658  ·  view source on GitHub ↗

Override to ensure the formatter is aware of the target file.

(self, file: IO[str] | None = None)

Source from the content-addressed store, hash-verified

650 super().print_usage(file)
651
652 def print_help(self, file: IO[str] | None = None) -> None: # type:ignore[override]
653 """Override to ensure the formatter is aware of the target file."""
654 if file is None:
655 file = self._thread_locals.current_output_file
656
657 with self.output_to(file):
658 super().print_help(file)
659
660 def get_subparsers_action(self) -> "argparse._SubParsersAction[Cmd2ArgumentParser]":
661 """Get the _SubParsersAction for this parser if it exists.

Callers 4

do_helpMethod · 0.45

Calls 1

output_toMethod · 0.95

Tested by 3