Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / class
Symbol
codeintel.parsers.base.Symbol
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 |
|---|---|---|
| line_chunks | __init__.py | through an import |
| _enter | python_parser.py | through an import |
| parse_python | python_parser.py | through an import |
| parse_treesitter | treesitter_parser.py | through an import |
| Symbol | File | Resolved by |
|---|---|---|
| add_call | base.py | same file |
| add_identifier | base.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| base | base.py | same file |
codeintel.parsers.base.Symbolbackend/app/codeintel/parsers/base.py, lines 14–46Open source
@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 ( name and len(name) > 1 and name not in self.identifiers and len(self.identifiers) < MAX_IDENTIFIERS ): self.identifiers.append(name)What the index recorded
- Signature
class Symbol:- File
backend/app/codeintel/parsers/base.py- Lines
- 14–46
- Parser
- python-ast
- Git blob
3ebc48248b33125ad21597173a82926893a501dc- Call sites
- 1 named, 0 resolved, 1 left unlinked
