Back to the room

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

Code Observatory / method

as_dict

codeintel.indexer.IndexStats.as_dict

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
_rebuild_graphindexer.pysame file
indexindexer.pysame file
Inside (1)
SymbolFileResolved by
IndexStatsindexer.pysame file
codeintel.indexer.IndexStats.as_dictbackend/app/codeintel/indexer.py, lines 86–99Open source
    def as_dict(self) -> dict:        # asdict() rebuilds dicts as type(d)(pairs), which fails for        # defaultdict on Python < 3.12: convert those fields first.        plain = replace(            self,            skipped=dict(self.skipped),            timings_s={k: round(v, 3) for k, v in self.timings_s.items()},            languages={                name: replace(lang, fallback_reasons=dict(lang.fallback_reasons))                for name, lang in self.languages.items()            },            errors=self.errors[:50],        )        return asdict(plain)

What the index recorded

Signature
def as_dict(self) -> dict:
File
backend/app/codeintel/indexer.py
Lines
86–99
Parser
python-ast
Git blob
e8fdfa7b5545e821f7649d68cfadd2aae85b89d0
Call sites
5 named, 0 resolved, 5 left unlinked

Read it on GitHub at this commit