(pattern_parts)
| 607 | # |
| 608 | |
| 609 | def _make_selector(pattern_parts): |
| 610 | pat = pattern_parts[0] |
| 611 | child_parts = pattern_parts[1:] |
| 612 | if pat == '**': |
| 613 | cls = _RecursiveWildcardSelector |
| 614 | elif '**' in pat: |
| 615 | raise ValueError( |
| 616 | "Invalid pattern: '**' can only be an entire path component") |
| 617 | elif _is_wildcard_pattern(pat): |
| 618 | cls = _WildcardSelector |
| 619 | else: |
| 620 | cls = _PreciseSelector |
| 621 | return cls(pat, child_parts) |
| 622 | |
| 623 | |
| 624 | if hasattr(functools, "lru_cache"): |
no test coverage detected