Return True if any component of path matches an exclude pattern.
(path: Path, exclude_parts: list[str])
| 95 | |
| 96 | |
| 97 | def _is_excluded(path: Path, exclude_parts: list[str]) -> bool: |
| 98 | """Return True if any component of path matches an exclude pattern.""" |
| 99 | path_str = path.as_posix() |
| 100 | for exc in exclude_parts: |
| 101 | if exc in path_str: |
| 102 | return True |
| 103 | return False |
| 104 | |
| 105 | |
| 106 | def main(argv: list[str] | None = None) -> int: |
no outgoing calls
no test coverage detected