MCPcopy Index your code
hub / github.com/Doorman11991/smallcode / snippet_id

Function snippet_id

scripts/rag_scraper.py:171–172  ·  view source on GitHub ↗
(repo: str, rel: str, start: int, code: str)

Source from the content-addressed store, hash-verified

169
170
171def snippet_id(repo: str, rel: str, start: int, code: str) -> str:
172 return hashlib.sha1(f"{repo}:{rel}:{start}:{code}".encode("utf-8", "ignore")).hexdigest()
173
174
175def scrape_repo(spec: RepoSpec, repo_root: Path, options: argparse.Namespace) -> Iterator[Dict[str, object]]:

Callers 1

scrape_repoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected