(self, actions, arg_strings_pattern)
| 2036 | return len(match.group(1)) |
| 2037 | |
| 2038 | def _match_arguments_partial(self, actions, arg_strings_pattern): |
| 2039 | # progressively shorten the actions list by slicing off the |
| 2040 | # final actions until we find a match |
| 2041 | result = [] |
| 2042 | for i in range(len(actions), 0, -1): |
| 2043 | actions_slice = actions[:i] |
| 2044 | pattern = ''.join([self._get_nargs_pattern(action) |
| 2045 | for action in actions_slice]) |
| 2046 | match = _re.match(pattern, arg_strings_pattern) |
| 2047 | if match is not None: |
| 2048 | result.extend([len(string) for string in match.groups()]) |
| 2049 | break |
| 2050 | |
| 2051 | # return the list of arg string counts |
| 2052 | return result |
| 2053 | |
| 2054 | def _parse_optional(self, arg_string): |
| 2055 | # if it's an empty string, it was meant to be a positional |
nothing calls this directly
no test coverage detected