MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / format_help

Method format_help

tools/python-3.11.9-amd64/Lib/argparse.py:2574–2595  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2572 return formatter.format_help()
2573
2574 def format_help(self):
2575 formatter = self._get_formatter()
2576
2577 # usage
2578 formatter.add_usage(self.usage, self._actions,
2579 self._mutually_exclusive_groups)
2580
2581 # description
2582 formatter.add_text(self.description)
2583
2584 # positionals, optionals and user-defined groups
2585 for action_group in self._action_groups:
2586 formatter.start_section(action_group.title)
2587 formatter.add_text(action_group.description)
2588 formatter.add_arguments(action_group._group_actions)
2589 formatter.end_section()
2590
2591 # epilog
2592 formatter.add_text(self.epilog)
2593
2594 # determine help from format above
2595 return formatter.format_help()
2596
2597 def _get_formatter(self):
2598 return self.formatter_class(prog=self.prog)

Callers 2

mainFunction · 0.95
print_helpMethod · 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

Tested by

no test coverage detected