Return True if a path should be skipped.
(rel: Path)
| 100 | |
| 101 | |
| 102 | def is_excluded(rel: Path) -> bool: |
| 103 | """Return True if a path should be skipped.""" |
| 104 | rel_str = str(rel) |
| 105 | |
| 106 | # Exact filename exclusions. |
| 107 | if rel.name in EXCLUDE_FILES: |
| 108 | return True |
| 109 | |
| 110 | # Directory exclusions. |
| 111 | for exc_dir in EXCLUDE_DIRS: |
| 112 | if rel_str == exc_dir or rel_str.startswith(exc_dir + "/"): |
| 113 | return True |
| 114 | |
| 115 | # Prefix exclusions (CI config, editor config). |
| 116 | return any(rel_str.startswith(prefix) for prefix in EXCLUDE_DIR_PREFIXES) |
| 117 | |
| 118 | |
| 119 | def git_candidate_files(root: Path) -> list[Path] | None: |
no outgoing calls
no test coverage detected