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

Method __init__

tools/python-3.11.9-amd64/Lib/argparse.py:929–956  ·  view source on GitHub ↗
(self,
                 option_strings,
                 dest,
                 nargs=None,
                 const=None,
                 default=None,
                 type=None,
                 choices=None,
                 required=False,
                 help=None,
                 metavar=None)

Source from the content-addressed store, hash-verified

927class _StoreAction(Action):
928
929 def __init__(self,
930 option_strings,
931 dest,
932 nargs=None,
933 const=None,
934 default=None,
935 type=None,
936 choices=None,
937 required=False,
938 help=None,
939 metavar=None):
940 if nargs == 0:
941 raise ValueError('nargs for store actions must be != 0; if you '
942 'have nothing to store, actions such as store '
943 'true or store const may be more appropriate')
944 if const is not None and nargs != OPTIONAL:
945 raise ValueError('nargs must be %r to supply const' % OPTIONAL)
946 super(_StoreAction, self).__init__(
947 option_strings=option_strings,
948 dest=dest,
949 nargs=nargs,
950 const=const,
951 default=default,
952 type=type,
953 choices=choices,
954 required=required,
955 help=help,
956 metavar=metavar)
957
958 def __call__(self, parser, namespace, values, option_string=None):
959 setattr(namespace, self.dest, values)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected