Load ignore patterns from .code-review-graphignore file.
(repo_root: Path)
| 352 | |
| 353 | |
| 354 | def _load_ignore_patterns(repo_root: Path) -> list[str]: |
| 355 | """Load ignore patterns from .code-review-graphignore file.""" |
| 356 | patterns = list(DEFAULT_IGNORE_PATTERNS) |
| 357 | ignore_file = repo_root / ".code-review-graphignore" |
| 358 | if ignore_file.exists(): |
| 359 | for line in ignore_file.read_text(encoding="utf-8", errors="replace").splitlines(): |
| 360 | line = line.strip() |
| 361 | if line and not line.startswith("#"): |
| 362 | patterns.append(line) |
| 363 | return patterns |
| 364 | |
| 365 | |
| 366 | def _should_ignore(path: str, patterns: list[str]) -> bool: |
no outgoing calls