MCPcopy
hub / github.com/MinishLab/semble / _build_index

Function _build_index

src/semble/cli.py:26–32  ·  view source on GitHub ↗

Build an index from a local path or git URL.

(path: str, content: list[ContentType])

Source from the content-addressed store, hash-verified

24
25
26def _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
35def _maybe_save_index(index: SembleIndex, path: str) -> None:

Callers 1

_load_indexFunction · 0.70

Calls 3

is_git_urlFunction · 0.90
from_gitMethod · 0.80
from_pathMethod · 0.45

Tested by

no test coverage detected