MCPcopy
hub / github.com/tanelpoder/0xtools / format_help

Method format_help

lib/0xtools/argparse.py:2302–2323  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2300 return formatter.format_help()
2301
2302 def format_help(self):
2303 formatter = self._get_formatter()
2304
2305 # usage
2306 formatter.add_usage(self.usage, self._actions,
2307 self._mutually_exclusive_groups)
2308
2309 # description
2310 formatter.add_text(self.description)
2311
2312 # positionals, optionals and user-defined groups
2313 for action_group in self._action_groups:
2314 formatter.start_section(action_group.title)
2315 formatter.add_text(action_group.description)
2316 formatter.add_arguments(action_group._group_actions)
2317 formatter.end_section()
2318
2319 # epilog
2320 formatter.add_text(self.epilog)
2321
2322 # determine help from format above
2323 return formatter.format_help()
2324
2325 def format_version(self):
2326 import warnings

Callers 1

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