Back to the room

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

Code Observatory / method

take

codeintel.context._Budget.take

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
_rendercontext.pysame file
Inside (1)
SymbolFileResolved by
_Budgetcontext.pysame file
codeintel.context._Budget.takebackend/app/codeintel/context.py, lines 70–79Open source
    def take(self, text: str) -> str | None:        remaining = self.limit - self.used        if remaining <= 0:            self.truncated = True            return None        if len(text) > remaining:            self.truncated = True            text = text[:remaining]        self.used += len(text)        return text

What the index recorded

Signature
def take(self, text: str) -> str | None:
File
backend/app/codeintel/context.py
Lines
70–79
Parser
python-ast
Git blob
0c4a7dd4639651a5c13142d168630e344439f22a
Call sites
1 named, 0 resolved, 1 left unlinked

Read it on GitHub at this commit