Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / class

RepoRef

codeintel.git_source.RepoRef

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 symbols

Loading

Called by (2)
SymbolFileResolved by
_local_refgit_source.pysame file
parse_repo_specgit_source.pysame file
Contains (3)
SymbolFileResolved by
is_githubgit_source.pysame file
raw_urlgit_source.pysame file
web_urlgit_source.pysame file
Inside (1)
SymbolFileResolved by
git_sourcegit_source.pysame file
codeintel.git_source.RepoRefbackend/app/codeintel/git_source.py, lines 62–87Open source
@dataclass(frozen=True)class RepoRef:    """A validated repository reference."""    #: Stable identity used as ``repositories.url``.    canonical_url: str    #: "github" | "git" | "local"    source_type: str    #: Human-readable name, e.g. "owner/repo".    name: str    #: https URL git clones from (remote only).    clone_url: str | None = None    #: Absolute path of a local repository (local only).    local_path: str | None = None    host: str | None = None    @property    def is_github(self) -> bool:        return self.source_type == "github"    def raw_url(self, commit: str, path: str) -> str | None:        """URL serving the file's raw bytes at ``commit`` (None for local repos)."""        return raw_file_url(self.canonical_url, commit, path)    def web_url(self, commit: str, path: str, start: int | None, end: int | None) -> str | None:        return web_file_url(self.canonical_url, commit, path, start, end)

What the index recorded

Signature
class RepoRef:
File
backend/app/codeintel/git_source.py
Lines
62–87
Parser
python-ast
Git blob
6f88470169e4935929c5f865a974bd86da564c1a
Call sites
1 named, 0 resolved, 1 left unlinked

Read it on GitHub at this commit