Lines Matching refs:option_string

448                 option_string = action.option_strings[0]
453 part = '%s' % option_string
460 part = '%s %s' % (option_string, args_string)
561 for option_string in action.option_strings:
562 parts.append('%s %s' % (option_string, args_string))
838 def __call__(self, parser, namespace, values, option_string=None): argument
873 def __call__(self, parser, namespace, values, option_string=None): argument
896 def __call__(self, parser, namespace, values, option_string=None): argument
965 def __call__(self, parser, namespace, values, option_string=None): argument
992 def __call__(self, parser, namespace, values, option_string=None): argument
1015 def __call__(self, parser, namespace, values, option_string=None): argument
1036 def __call__(self, parser, namespace, values, option_string=None): argument
1057 def __call__(self, parser, namespace, values, option_string=None): argument
1128 def __call__(self, parser, namespace, values, option_string=None): argument
1388 for option_string in action.option_strings:
1389 self._option_string_actions[option_string] = action
1392 for option_string in action.option_strings:
1393 if self._negative_number_matcher.match(option_string):
1463 for option_string in args:
1465 if not option_string[0] in self.prefix_chars:
1466 args = {'option': option_string,
1473 option_strings.append(option_string)
1474 if option_string[0] in self.prefix_chars:
1475 if len(option_string) > 1:
1476 if option_string[1] in self.prefix_chars:
1477 long_option_strings.append(option_string)
1489 raise ValueError(msg % option_string)
1512 for option_string in action.option_strings:
1513 if option_string in self._option_string_actions:
1514 confl_optional = self._option_string_actions[option_string]
1515 confl_optionals.append((option_string, confl_optional))
1526 conflict_string = ', '.join([option_string
1527 for option_string, action
1534 for option_string, action in conflicting_actions:
1537 action.option_strings.remove(option_string)
1538 self._option_string_actions.pop(option_string, None)
1837 def take_action(action, argument_strings, option_string=None): argument
1855 action(self, namespace, argument_values, option_string)
1862 action, option_string, explicit_arg = option_tuple
1884 if arg_count == 0 and option_string[1] not in chars:
1885 action_tuples.append((action, [], option_string))
1886 char = option_string[0]
1887 option_string = char + explicit_arg[0]
1890 if option_string in optionals_map:
1891 action = optionals_map[option_string]
1902 action_tuples.append((action, args, option_string))
1920 action_tuples.append((action, args, option_string))
1926 for action, args, option_string in action_tuples:
1927 take_action(action, args, option_string)
2122 option_string, explicit_arg = arg_string.split('=', 1)
2123 if option_string in self._option_string_actions:
2124 action = self._option_string_actions[option_string]
2125 return action, option_string, explicit_arg
2134 options = ', '.join([option_string
2135 for action, option_string, explicit_arg in option_tuples])
2161 def _get_option_tuples(self, option_string): argument
2167 if option_string[0] in chars and option_string[1] in chars:
2168 if '=' in option_string:
2169 option_prefix, explicit_arg = option_string.split('=', 1)
2171 option_prefix = option_string
2173 for option_string in self._option_string_actions:
2174 if option_string.startswith(option_prefix):
2175 action = self._option_string_actions[option_string]
2176 tup = action, option_string, explicit_arg
2182 elif option_string[0] in chars and option_string[1] not in chars:
2183 option_prefix = option_string
2185 short_option_prefix = option_string[:2]
2186 short_explicit_arg = option_string[2:]
2188 for option_string in self._option_string_actions:
2189 if option_string == short_option_prefix:
2190 action = self._option_string_actions[option_string]
2191 tup = action, option_string, short_explicit_arg
2193 elif option_string.startswith(option_prefix):
2194 action = self._option_string_actions[option_string]
2195 tup = action, option_string, explicit_arg
2200 self.error(_('unexpected option string: %s') % option_string)