Back to the room

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

Code Observatory / module

base

codeintel.parsers.base

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

Contains (3)
SymbolFileResolved by
clipbase.pysame file
ParseResultbase.pysame file
Symbolbase.pysame file
Imported by (4)
SymbolFileResolved by
parsers__init__.pythrough an import
python_parserpython_parser.pythrough an import
treesitter_parsertreesitter_parser.pythrough an import
texttext.pythrough an import
codeintel.parsers.basebackend/app/codeintel/parsers/base.py, lines 1–40Open source
"""Parser output model shared by all extractors."""from __future__ import annotationsfrom dataclasses import dataclass, field# Per-symbol caps keep summaries and search_text bounded for huge bodies.MAX_CALLS = 64MAX_IDENTIFIERS = 96MAX_DOCSTRING_CHARS = 600MAX_SIGNATURE_CHARS = 300@dataclassclass Symbol:    """A retrievable unit of code: a module, class, function, method, ...    Line numbers are 1-based and inclusive.    """    name: str    qualified_name: str    kind: str  # module | class | function | method | interface | struct | enum | trait | impl | type    start_line: int    end_line: int    signature: str    docstring: str = ""    # Simple names of called functions / constructed types, in first-seen order.    calls: list[str] = field(default_factory=list)    # Identifiers referenced in the body (bounded; feeds keyword search).    identifiers: list[str] = field(default_factory=list)    # Qualified name of the enclosing class / impl / module symbol.    parent: str | None = None    def add_call(self, name: str) -> None:        if name and name not in self.calls and len(self.calls) < MAX_CALLS:            self.calls.append(name)    def add_identifier(self, name: str) -> None:        if (

Shows the first 40 of 68 lines. The rest is on GitHub at this commit.

What the index recorded

Signature
module backend.app.codeintel.parsers.base
File
backend/app/codeintel/parsers/base.py
Lines
1–68
Parser
python-ast
Git blob
3ebc48248b33125ad21597173a82926893a501dc

Read it on GitHub at this commit