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

Method __init__

Lib/argparse.py:1063–1092  ·  view source on GitHub ↗
(self,
                 option_strings,
                 dest,
                 nargs=None,
                 const=None,
                 default=None,
                 type=None,
                 choices=None,
                 required=False,
                 help=None,
                 metavar=None,
                 deprecated=False)

Source from the content-addressed store, hash-verified

1061class _AppendAction(Action):
1062
1063 def __init__(self,
1064 option_strings,
1065 dest,
1066 nargs=None,
1067 const=None,
1068 default=None,
1069 type=None,
1070 choices=None,
1071 required=False,
1072 help=None,
1073 metavar=None,
1074 deprecated=False):
1075 if nargs == 0:
1076 raise ValueError('nargs for append actions must be != 0; if arg '
1077 'strings are not supplying the value to append, '
1078 'the append const action may be more appropriate')
1079 if const is not None and nargs != OPTIONAL:
1080 raise ValueError('nargs must be %r to supply const' % OPTIONAL)
1081 super(_AppendAction, self).__init__(
1082 option_strings=option_strings,
1083 dest=dest,
1084 nargs=nargs,
1085 const=const,
1086 default=default,
1087 type=type,
1088 choices=choices,
1089 required=required,
1090 help=help,
1091 metavar=metavar,
1092 deprecated=deprecated)
1093
1094 def __call__(self, parser, namespace, values, option_string=None):
1095 items = getattr(namespace, self.dest, None)

Callers

nothing calls this directly

Calls 2

superClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected