Function
_check_initialpaths_for_relpath
(
initial_paths: frozenset[Path], path: Path
)
Source from the content-addressed store, hash-verified
| 537 | |
| 538 | @lru_cache(maxsize=1000) |
| 539 | def _check_initialpaths_for_relpath( |
| 540 | initial_paths: frozenset[Path], path: Path |
| 541 | ) -> str | None: |
| 542 | if path in initial_paths: |
| 543 | return "" |
| 544 | |
| 545 | for parent in path.parents: |
| 546 | if parent in initial_paths: |
| 547 | return str(path.relative_to(parent)) |
| 548 | |
| 549 | return None |
| 550 | |
| 551 | |
| 552 | class FSCollector(Collector, abc.ABC): |
Tested by
no test coverage detected