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

Method _expand_help

Lib/argparse.py:659–672  ·  view source on GitHub ↗
(self, action)

Source from the content-addressed store, hash-verified

657 return result
658
659 def _expand_help(self, action):
660 help_string = self._get_help_string(action)
661 if '%' not in help_string:
662 return help_string
663 params = dict(vars(action), prog=self._prog)
664 for name in list(params):
665 value = params[name]
666 if value is SUPPRESS:
667 del params[name]
668 elif hasattr(value, '__name__'):
669 params[name] = value.__name__
670 if params.get('choices') is not None:
671 params['choices'] = ', '.join(map(str, params['choices']))
672 return help_string % params
673
674 def _iter_indented_subactions(self, action):
675 try:

Callers 2

_format_actionMethod · 0.95
_check_helpMethod · 0.80

Calls 6

_get_help_stringMethod · 0.95
varsFunction · 0.85
listClass · 0.85
hasattrFunction · 0.85
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected