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

Method _get_formatter

cmd2/argparse_utils.py:874–876  ·  view source on GitHub ↗

Override with customizations for Cmd2HelpFormatter.

(self, **_kwargs: Any)

Source from the content-addressed store, hash-verified

872 self.exit(2, f"{formatted_message}\n")
873
874 def _get_formatter(self, **_kwargs: Any) -> Cmd2HelpFormatter:
875 """Override with customizations for Cmd2HelpFormatter."""
876 return self.formatter_class(prog=self.prog, file=self._thread_locals.current_output_file)
877
878 def format_help(self) -> str:
879 """Override to add a newline."""

Callers 3

errorMethod · 0.95
test_rich_metavar_partsFunction · 0.95
_build_hintFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_rich_metavar_partsFunction · 0.76