Back to the room

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

Code Observatory / function

_cite

codeintel.context._cite

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 (1)
SymbolFileResolved by
_render_memorycontext.pysame file
Inside (1)
SymbolFileResolved by
contextcontext.pysame file
codeintel.context._citebackend/app/codeintel/context.py, lines 311–318Open source
def _cite(evidence: dict) -> str:    if evidence.get("kind") == "code":        return f"{evidence['path']}:{evidence['start_line']}"    if evidence.get("kind") in ("commit", "diff"):        return evidence["sha"][:10]    if evidence.get("kind") == "tally":        return ""  # the full list stays in the item's evidence; the context cites a file or commit    return evidence.get("path", "")

What the index recorded

Signature
def _cite(evidence: dict) -> str:
File
backend/app/codeintel/context.py
Lines
311–318
Parser
python-ast
Git blob
0c4a7dd4639651a5c13142d168630e344439f22a
Call sites
1 named, 0 resolved, 1 left unlinked

Read it on GitHub at this commit