Back to the room

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 symbols

Loading

Called by (1)
SymbolFileResolved by
_resolve_onesource.pysame file
Inside (1)
SymbolFileResolved by
sourcesource.pysame 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

Read it on GitHub at this commit