MCPcopy Index your code
hub / github.com/RustPython/RustPython / format_help

Method format_help

Lib/argparse.py:2703–2724  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2701 return formatter.format_help()
2702
2703 def format_help(self):
2704 formatter = self._get_formatter()
2705
2706 # usage
2707 formatter.add_usage(self.usage, self._actions,
2708 self._mutually_exclusive_groups)
2709
2710 # description
2711 formatter.add_text(self.description)
2712
2713 # positionals, optionals and user-defined groups
2714 for action_group in self._action_groups:
2715 formatter.start_section(action_group.title)
2716 formatter.add_text(action_group.description)
2717 formatter.add_arguments(action_group._group_actions)
2718 formatter.end_section()
2719
2720 # epilog
2721 formatter.add_text(self.epilog)
2722
2723 # determine help from format above
2724 return formatter.format_help()
2725
2726 def _get_formatter(self):
2727 formatter = self.formatter_class(prog=self.prog)

Callers 12

mainFunction · 0.95
_parse_argsFunction · 0.95
print_helpMethod · 0.95
_parse_argsFunction · 0.95
test_argparse_colorMethod · 0.95

Calls 7

_get_formatterMethod · 0.95
add_usageMethod · 0.80
add_textMethod · 0.80
start_sectionMethod · 0.80
add_argumentsMethod · 0.80
end_sectionMethod · 0.80
format_helpMethod · 0.45