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 symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| Symbol | base.py | through an import |
| add_identifier | base.py | unique name |
| _docstring | python_parser.py | same file |
| _signature | python_parser.py | same file |
| _start_line | python_parser.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| _visit_func | python_parser.py | same file |
| visit_ClassDef | python_parser.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| _Extractor | python_parser.py | same 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
