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

Function _get_action_name

tools/python-3.11.9-amd64/Lib/argparse.py:749–761  ·  view source on GitHub ↗
(argument)

Source from the content-addressed store, hash-verified

747# =====================
748
749def _get_action_name(argument):
750 if argument is None:
751 return None
752 elif argument.option_strings:
753 return '/'.join(argument.option_strings)
754 elif argument.metavar not in (None, SUPPRESS):
755 return argument.metavar
756 elif argument.dest not in (None, SUPPRESS):
757 return argument.dest
758 elif argument.choices:
759 return '{' + ','.join(argument.choices) + '}'
760 else:
761 return None
762
763
764class ArgumentError(Exception):

Callers 3

__init__Method · 0.85
take_actionMethod · 0.85
_parse_known_argsMethod · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected