Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / method
visit_Import
codeintel.parsers.python_parser._Extractor.visit_Import
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 |
|---|---|---|
| add_identifier | base.py | unique name |
| Symbol | File | Resolved by |
|---|---|---|
| _Extractor | python_parser.py | same file |
codeintel.parsers.python_parser._Extractor.visit_Importbackend/app/codeintel/parsers/python_parser.py, lines 170–175Open source
def visit_Import(self, node: ast.Import) -> None: for alias in node.names: self.imports.append(alias.name) local = alias.asname or alias.name.split(".")[0] self.import_map[local] = alias.name if alias.asname else local self.current.add_identifier(local)What the index recorded
- Signature
def visit_Import(self, node: ast.Import) -> None:- File
backend/app/codeintel/parsers/python_parser.py- Lines
- 170–175
- Parser
- python-ast
- Git blob
63495bcda67d5742151d40ab76540e513f44e088- Call sites
- 3 named, 1 resolved, 2 left unlinked
