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
| 825 | class _StoreAction(Action): |
| 826 | |
| 827 | def __init__(self, |
| 828 | option_strings, |
| 829 | dest, |
| 830 | nargs=None, |
| 831 | const=None, |
| 832 | default=None, |
| 833 | type=None, |
| 834 | choices=None, |
| 835 | required=False, |
| 836 | help=None, |
| 837 | metavar=None): |
| 838 | if nargs == 0: |
| 839 | raise ValueError('nargs for store actions must be > 0; if you ' |
| 840 | 'have nothing to store, actions such as store ' |
| 841 | 'true or store const may be more appropriate') |
| 842 | if const is not None and nargs != OPTIONAL: |
| 843 | raise ValueError('nargs must be %r to supply const' % OPTIONAL) |
| 844 | super(_StoreAction, self).__init__( |
| 845 | option_strings=option_strings, |
| 846 | dest=dest, |
| 847 | nargs=nargs, |
| 848 | const=const, |
| 849 | default=default, |
| 850 | type=type, |
| 851 | choices=choices, |
| 852 | required=required, |
| 853 | help=help, |
| 854 | metavar=metavar) |
| 855 | |
| 856 | def __call__(self, parser, namespace, values, option_string=None): |
| 857 | setattr(namespace, self.dest, values) |
Callers
nothing calls this directly
Tested by
no test coverage detected