Returns a function that selects from a given path, walking and filtering according to the glob-style pattern parts in *parts*.
(self, parts)
| 383 | return _compile_pattern(pat, seps, self.case_sensitive, self.recursive) |
| 384 | |
| 385 | def selector(self, parts): |
| 386 | """Returns a function that selects from a given path, walking and |
| 387 | filtering according to the glob-style pattern parts in *parts*. |
| 388 | """ |
| 389 | if not parts: |
| 390 | return self.select_exists |
| 391 | part = parts.pop() |
| 392 | if self.recursive and part == '**': |
| 393 | selector = self.recursive_selector |
| 394 | elif part in _special_parts: |
| 395 | selector = self.special_selector |
| 396 | elif not self.case_pedantic and magic_check.search(part) is None: |
| 397 | selector = self.literal_selector |
| 398 | else: |
| 399 | selector = self.wildcard_selector |
| 400 | return selector(part, parts) |
| 401 | |
| 402 | def special_selector(self, part, parts): |
| 403 | """Returns a function that selects special children of the given path. |
no test coverage detected