Lines Matching refs:match
1403 # if these defaults match any existing arguments, replace
1461 # raise an error if the metavar does not match the type
1466 raise ValueError("length of metavar tuple does not match nargs")
1494 if self._negative_number_matcher.match(option_string):
1998 # if there is an explicit argument, try to match the
2038 # if there is no explicit argument, try to match the
2063 # match as many Positionals as possible
2192 # match the pattern for this action to the arg strings
2194 match = _re.match(nargs_pattern, arg_strings_pattern)
2196 # raise an exception if we weren't able to find a match
2197 if match is None:
2211 return len(match.group(1))
2215 # final actions until we find a match
2221 match = _re.match(pattern, arg_strings_pattern)
2222 if match is not None:
2223 result.extend([len(string) for string in match.groups()])
2258 # if multiple actions match, the option string was ambiguous
2263 msg = _('ambiguous option: %(option)s could match %(matches)s')
2275 if self._negative_number_matcher.match(arg_string):