Back to the room

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

Code Observatory / function

_signature

codeintel.parsers.treesitter_parser._signature

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

Calls (1)
SymbolFileResolved by
clipbase.pythrough an import
Called by (1)
SymbolFileResolved by
parse_treesittertreesitter_parser.pysame file
Inside (1)
SymbolFileResolved by
treesitter_parsertreesitter_parser.pysame file
codeintel.parsers.treesitter_parser._signaturebackend/app/codeintel/parsers/treesitter_parser.py, lines 381–389Open source
def _signature(node, src: bytes) -> str:    """Definition header: text from the node start up to its body."""    body = node.child_by_field_name("body")    end = body.start_byte if body is not None else node.end_byte    header = src[node.start_byte:end].decode("utf-8", errors="replace")    if body is None:        header = header.split("\n", 1)[0]    # A C macro's first line ends in a line continuation.    return clip(header.rstrip().rstrip("\\").rstrip().rstrip("{").rstrip(), MAX_SIGNATURE_CHARS)

What the index recorded

Signature
def _signature(node, src: bytes) -> str:
File
backend/app/codeintel/parsers/treesitter_parser.py
Lines
381–389
Parser
python-ast
Git blob
bf0c9a8044cadd3452ebf5ffa82b866ae00395a9
Call sites
5 named, 1 resolved, 4 left unlinked

Read it on GitHub at this commit