Back to the room

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

Code Observatory / function

_decode

codeintel.indexer._decode

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
_index_batchindexer.pysame file
Inside (1)
SymbolFileResolved by
indexerindexer.pysame file
codeintel.indexer._decodebackend/app/codeintel/indexer.py, lines 106–113Open source
def _decode(data: bytes) -> str | None:    """UTF-8 (with BOM handling), falling back to latin-1. None for binary."""    if b"\0" in data[:8192]:        return None    try:        return data.decode("utf-8-sig")    except UnicodeDecodeError:        return data.decode("latin-1")

What the index recorded

Signature
def _decode(data: bytes) -> str | None:
File
backend/app/codeintel/indexer.py
Lines
106–113
Parser
python-ast
Git blob
e8fdfa7b5545e821f7649d68cfadd2aae85b89d0
Call sites
1 named, 0 resolved, 1 left unlinked

Read it on GitHub at this commit