Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / class
_Budget
codeintel.context._Budget
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 symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| assemble_context | context.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| take | context.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| context | context.py | same file |
codeintel.context._Budgetbackend/app/codeintel/context.py, lines 64–79Open source
@dataclassclass _Budget: limit: int used: int = 0 truncated: bool = False 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 textWhat the index recorded
- Signature
class _Budget:- File
backend/app/codeintel/context.py- Lines
- 64–79
- Parser
- python-ast
- Git blob
0c4a7dd4639651a5c13142d168630e344439f22a
