Return True if any component of path matches an exclude pattern.
(path: Path, exclude_parts: list[str])
| 129 | |
| 130 | |
| 131 | def _is_excluded(path: Path, exclude_parts: list[str]) -> bool: |
| 132 | """Return True if any component of path matches an exclude pattern.""" |
| 133 | path_str = path.as_posix() |
| 134 | for exc in exclude_parts: |
| 135 | if exc in path_str: |
| 136 | return True |
| 137 | return False |
| 138 | |
| 139 | |
| 140 | def main(argv: list[str] | None = None) -> int: |
no outgoing calls
no test coverage detected