Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_load
codeintel.source._load
PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.
PHAROS at 975a38dMIT license
Around this symbol
Search all symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| local_git_dir | git_source.py | through an import |
| raw_file_url | git_source.py | through an import |
| read_file_at_commit | git_source.py | through an import |
| _fetch_https | source.py | same file |
| get | source.py | same file |
| put | source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| _resolve_one | source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| source | source.py | same file |
codeintel.source._loadbackend/app/codeintel/source.py, lines 121–138Open source
def _load(req: SourceRequest, token: str | None) -> tuple[bytes, str]: cache_key = f"{req.repository_url}@{req.commit}:{req.path}" cached = _cache.get(cache_key) if cached is not None: return cached, "cache" if req.source_type == "local": if not req.local_path: raise FileNotFoundError("local repository path not recorded") data = read_file_at_commit(local_git_dir(req.local_path), req.commit, req.path) origin = "git" else: url = raw_file_url(req.repository_url, req.commit, req.path) if url is None: raise LookupError("no raw-content endpoint for this host") data = _fetch_https(url, token) origin = "https" _cache.put(cache_key, data) return data, originWhat the index recorded
- Signature
def _load(req: SourceRequest, token: str | None) -> tuple[bytes, str]:- File
backend/app/codeintel/source.py- Lines
- 121–138
- Parser
- python-ast
- Git blob
c9f05cf7bf871b09919d64e9fdaf8380ecc3df2c- Call sites
- 8 named, 6 resolved, 2 left unlinked
