Skip to content

ImportedCallGraphNode

Bases: CallGraphNode

Class for imported call graph nodes.

This class represents functions that are imported from other modules in the call graph.

Source code in src/library_analyzer/processing/api/purity_analysis/model/_call_graph.py
@dataclass
class ImportedCallGraphNode(CallGraphNode):
    """Class for imported call graph nodes.

    This class represents functions that are imported from other modules in the call graph.
    """

    symbol: Import

    def __hash__(self) -> int:
        return hash(str(self))

    def __str__(self) -> str:
        return f"{self.symbol.id}"

    def __repr__(self) -> str:
        return f"{self.symbol.name}: {id(self)}"

symbol: Import instance-attribute

__hash__()

Source code in src/library_analyzer/processing/api/purity_analysis/model/_call_graph.py
def __hash__(self) -> int:
    return hash(str(self))

__init__(symbol, reasons, children=dict())

__repr__()

Source code in src/library_analyzer/processing/api/purity_analysis/model/_call_graph.py
def __repr__(self) -> str:
    return f"{self.symbol.name}: {id(self)}"

__str__()

Source code in src/library_analyzer/processing/api/purity_analysis/model/_call_graph.py
def __str__(self) -> str:
    return f"{self.symbol.id}"