Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
web_file_url
codeintel.git_source.web_file_url
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 |
|---|---|---|
| hit_to_dict | context.py | through an import |
| web_url | git_source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| git_source | git_source.py | same file |
codeintel.git_source.web_file_urlbackend/app/codeintel/git_source.py, lines 108–118Open source
def web_file_url(canonical_url: str, commit: str, path: str, start: int | None, end: int | None) -> str | None: parts = urlsplit(canonical_url) if parts.scheme != "https": return None if parts.hostname == "github.com": anchor = f"#L{start}-L{end}" if start and end else "" return f"{canonical_url}/blob/{commit}/{path}{anchor}" if parts.hostname == "gitlab.com": anchor = f"#L{start}-{end}" if start and end else "" return f"{canonical_url}/-/blob/{commit}/{path}{anchor}" return NoneWhat the index recorded
- Signature
def web_file_url(canonical_url: str, commit: str, path: str, start: int | None, end: int | None) -> str | None:- File
backend/app/codeintel/git_source.py- Lines
- 108–118
- Parser
- python-ast
- Git blob
6f88470169e4935929c5f865a974bd86da564c1a- Call sites
- 1 named, 0 resolved, 1 left unlinked
