Back to the room

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

Code Observatory / method

_enter

codeintel.parsers.python_parser._Extractor._enter

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 (5)
SymbolFileResolved by
Symbolbase.pythrough an import
add_identifierbase.pyunique name
_docstringpython_parser.pysame file
_signaturepython_parser.pysame file
_start_linepython_parser.pysame file
Called by (2)
SymbolFileResolved by
_visit_funcpython_parser.pysame file
visit_ClassDefpython_parser.pysame file
Inside (1)
SymbolFileResolved by
_Extractorpython_parser.pysame file
codeintel.parsers.python_parser._Extractor._enterbackend/app/codeintel/parsers/python_parser.py, lines 108–134Open source
    def _enter(self, node: ast.AST, kind: str) -> None:        parent = self.current        name = node.name  # type: ignore[attr-defined]        sym = Symbol(            name=name,            qualified_name=f"{parent.qualified_name}.{name}" if parent.qualified_name else name,            kind=kind,            start_line=_start_line(node),            end_line=getattr(node, "end_lineno", None) or node.lineno,  # type: ignore[attr-defined]            signature=_signature(node),            docstring=_docstring(node),            parent=parent.qualified_name,        )        self.symbols.append(sym)        self.stack.append(sym)        for deco in getattr(node, "decorator_list", []):            self.visit(deco)        if isinstance(node, ast.ClassDef):            for base in node.bases:                self.visit(base)        else:            for arg in ast.walk(node.args):  # type: ignore[attr-defined]                if isinstance(arg, ast.arg):                    sym.add_identifier(arg.arg)        for child in node.body:  # type: ignore[attr-defined]            self.visit(child)        self.stack.pop()

What the index recorded

Signature
def _enter(self, node: ast.AST, kind: str) -> None:
File
backend/app/codeintel/parsers/python_parser.py
Lines
108–134
Parser
python-ast
Git blob
63495bcda67d5742151d40ab76540e513f44e088
Call sites
11 named, 5 resolved, 6 left unlinked

Read it on GitHub at this commit