Back to the room

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

Code Observatory / function

path_role

codeintel.retrieval.path_role

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

Calls (2)
SymbolFileResolved by
is_test_pathretrieval.pysame file
searchretrieval.pysame file
Called by (2)
SymbolFileResolved by
_candidatesdescribe.pythrough an import
_finalizeretrieval.pysame file
Inside (1)
SymbolFileResolved by
retrievalretrieval.pysame file
codeintel.retrieval.path_rolebackend/app/codeintel/retrieval.py, lines 149–157Open source
def path_role(path: str) -> str:    """``test``, ``docs``, ``example`` or ``source``."""    if is_test_path(path):        return "test"    if _DOCS_PATH_RE.search(path or ""):        return "docs"    if _EXAMPLE_PATH_RE.search(path or ""):        return "example"    return "source"

What the index recorded

Signature
def path_role(path: str) -> str:
File
backend/app/codeintel/retrieval.py
Lines
149–157
Parser
python-ast
Git blob
884729a39ae0b3d340ad83f75946677dcddf3791
Call sites
2 named, 2 resolved, 0 left unlinked
Outside this subset
10 more edges reach code outside the graph shown here

Read it on GitHub at this commit