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

Class ArgumentError

Lib/argparse.py:796–813  ·  view source on GitHub ↗

An error from creating or using an argument (optional or positional). The string value of this exception is the message, augmented with information about the argument that caused it.

Source from the content-addressed store, hash-verified

794
795
796class ArgumentError(Exception):
797 """An error from creating or using an argument (optional or positional).
798
799 The string value of this exception is the message, augmented with
800 information about the argument that caused it.
801 """
802
803 def __init__(self, argument, message):
804 self.argument_name = _get_action_name(argument)
805 self.message = message
806
807 def __str__(self):
808 if self.argument_name is None:
809 format = '%(message)s'
810 else:
811 format = _('argument %(argument_name)s: %(message)s')
812 return format % dict(message=self.message,
813 argument_name=self.argument_name)
814
815
816class ArgumentTypeError(Exception):

Callers 12

__call__Method · 0.70
parse_argsMethod · 0.70
take_actionMethod · 0.70
consume_optionalMethod · 0.70
_parse_known_argsMethod · 0.70
_read_args_from_filesMethod · 0.70
_match_argumentMethod · 0.70
_get_option_tuplesMethod · 0.70
parse_intermixed_argsMethod · 0.70
_get_valueMethod · 0.70
_check_valueMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected