Build an index from a local path or git URL, exiting on FileNotFoundError.
(path: str, content: list[ContentType])
| 97 | |
| 98 | |
| 99 | def _load_index(path: str, content: list[ContentType]) -> SembleIndex: |
| 100 | """Build an index from a local path or git URL, exiting on FileNotFoundError.""" |
| 101 | try: |
| 102 | return _build_index(path, content) |
| 103 | except FileNotFoundError as e: |
| 104 | print(str(e), file=sys.stderr) |
| 105 | sys.exit(1) |
| 106 | |
| 107 | |
| 108 | def _run_search(path: str, query: str, top_k: int, content: list[ContentType], max_snippet_lines: int | None) -> None: |
no test coverage detected