Build an index from a local path or git URL.
(path: str, content: list[ContentType])
| 24 | |
| 25 | |
| 26 | def _build_index(path: str, content: list[ContentType]) -> SembleIndex: |
| 27 | """Build an index from a local path or git URL.""" |
| 28 | return ( |
| 29 | SembleIndex.from_git(path, content=content) |
| 30 | if is_git_url(path) |
| 31 | else SembleIndex.from_path(path, content=content) |
| 32 | ) |
| 33 | |
| 34 | |
| 35 | def _maybe_save_index(index: SembleIndex, path: str) -> None: |
no test coverage detected