Parse all #include paths from an aggregator file.
(aggregator: Path)
| 81 | |
| 82 | |
| 83 | def _parse_includes(aggregator: Path) -> set[str]: |
| 84 | """Parse all #include paths from an aggregator file.""" |
| 85 | includes: set[str] = set() |
| 86 | try: |
| 87 | content = aggregator.read_text(encoding="utf-8") |
| 88 | except OSError: |
| 89 | return includes |
| 90 | for line in content.splitlines(): |
| 91 | m = INCLUDE_PATTERN.match(line) |
| 92 | if m: |
| 93 | includes.add(m.group(1)) |
| 94 | return includes |
| 95 | |
| 96 | |
| 97 | def _collect_included_files(excluded_dir: Path) -> tuple[Path | None, set[Path]]: |
no test coverage detected