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

Method __init__

Lib/argparse.py:924–950  ·  view source on GitHub ↗
(self,
                 option_strings,
                 dest,
                 default=None,
                 required=False,
                 help=None,
                 deprecated=False)

Source from the content-addressed store, hash-verified

922
923class BooleanOptionalAction(Action):
924 def __init__(self,
925 option_strings,
926 dest,
927 default=None,
928 required=False,
929 help=None,
930 deprecated=False):
931
932 _option_strings = []
933 for option_string in option_strings:
934 _option_strings.append(option_string)
935
936 if option_string.startswith('--'):
937 if option_string.startswith('--no-'):
938 raise ValueError(f'invalid option name {option_string!r} '
939 f'for BooleanOptionalAction')
940 option_string = '--no-' + option_string[2:]
941 _option_strings.append(option_string)
942
943 super().__init__(
944 option_strings=_option_strings,
945 dest=dest,
946 nargs=0,
947 default=default,
948 required=required,
949 help=help,
950 deprecated=deprecated)
951
952
953 def __call__(self, parser, namespace, values, option_string=None):

Callers

nothing calls this directly

Calls 4

superClass · 0.85
appendMethod · 0.45
startswithMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected