Skip to content

TargetReference

Bases: ReferenceNode

Class for target reference nodes.

A TargetReference represents a reference from a target (=Symbol) to a list of Symbols. This is used to represent a Reference from a reassignment to the original assignment (or another previous assignment) of the same variable.

Source code in src/library_analyzer/processing/api/purity_analysis/model/_reference.py
@dataclass
class TargetReference(ReferenceNode):
    """Class for target reference nodes.

    A TargetReference represents a reference from a target (=Symbol) to a list of Symbols.
    This is used to represent a Reference from a reassignment to the original assignment
    (or another previous assignment) of the same variable.
    """

    node: Symbol

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

node: Symbol instance-attribute

__hash__()

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

__init__(node, scope, referenced_symbols=list())