Compute default ``--path`` filter from CWD relative to project root.
(project_root: Path)
| 124 | |
| 125 | |
| 126 | def resolve_default_path(project_root: Path) -> str | None: |
| 127 | """Compute default ``--path`` filter from CWD relative to project root.""" |
| 128 | cwd = Path.cwd().resolve() |
| 129 | try: |
| 130 | rel = cwd.relative_to(project_root) |
| 131 | except ValueError: |
| 132 | return None |
| 133 | if rel == Path("."): |
| 134 | return None |
| 135 | return f"{rel.as_posix()}/*" |
| 136 | |
| 137 | |
| 138 | def _format_progress(progress: IndexingProgress) -> str: |
no outgoing calls