Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_slice
codeintel.source._slice
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 |
|---|---|---|
| _resolve_one | source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| source | source.py | same file |
codeintel.source._slicebackend/app/codeintel/source.py, lines 89–94Open source
def _slice(data: bytes, start: int, end: int) -> str: text = data.decode("utf-8-sig", errors="replace") lines = text.splitlines() start = max(1, start) end = max(start, end) return "\n".join(lines[start - 1 : end])What the index recorded
- Signature
def _slice(data: bytes, start: int, end: int) -> str:- File
backend/app/codeintel/source.py- Lines
- 89–94
- Parser
- python-ast
- Git blob
c9f05cf7bf871b09919d64e9fdaf8380ecc3df2c- Call sites
- 4 named, 0 resolved, 4 left unlinked
