Method
__init__
(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
| 1019 | class _AppendAction(Action): |
| 1020 | |
| 1021 | def __init__(self, |
| 1022 | option_strings, |
| 1023 | dest, |
| 1024 | nargs=None, |
| 1025 | const=None, |
| 1026 | default=None, |
| 1027 | type=None, |
| 1028 | choices=None, |
| 1029 | required=False, |
| 1030 | help=None, |
| 1031 | metavar=None): |
| 1032 | if nargs == 0: |
| 1033 | raise ValueError('nargs for append actions must be != 0; if arg ' |
| 1034 | 'strings are not supplying the value to append, ' |
| 1035 | 'the append const action may be more appropriate') |
| 1036 | if const is not None and nargs != OPTIONAL: |
| 1037 | raise ValueError('nargs must be %r to supply const' % OPTIONAL) |
| 1038 | super(_AppendAction, self).__init__( |
| 1039 | option_strings=option_strings, |
| 1040 | dest=dest, |
| 1041 | nargs=nargs, |
| 1042 | const=const, |
| 1043 | default=default, |
| 1044 | type=type, |
| 1045 | choices=choices, |
| 1046 | required=required, |
| 1047 | help=help, |
| 1048 | metavar=metavar) |
| 1049 | |
| 1050 | def __call__(self, parser, namespace, values, option_string=None): |
| 1051 | items = getattr(namespace, self.dest, None) |
Callers
nothing calls this directly
Tested by
no test coverage detected