MCPcopy
hub / github.com/ShishirPatil/gorilla / exit_with_help_message

Function exit_with_help_message

goex/cli.py:272–288  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

270
271
272def exit_with_help_message(parser):
273 print(green("To execute a prompt with a specified execution type", ['bold']))
274 # retrieve subparsers from parser
275 subparsers_actions = [
276 action for action in parser._actions
277 if isinstance(action, argparse._SubParsersAction)]
278 # there will probably only be one subparser_action,
279 # but better save than sorry
280 for subparsers_action in subparsers_actions:
281 # get all subparsers and print help
282 for choice, subparser in subparsers_action.choices.items():
283 print(subparser.format_help())
284
285 print(green("To perform other Gorilla-x operations", ['bold']))
286 parser.print_help()
287
288 parser.exit()
289
290class _HelpAction(argparse._HelpAction):
291

Callers 3

__call__Method · 0.85
errorMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected