Skip to content

Builtin

Bases: Symbol

Represents a builtin (function).

Attributes:

Name Type Description
call Call

The call node of the function.

Source code in src/library_analyzer/processing/api/purity_analysis/model/_module_data.py
@dataclass
class Builtin(Symbol):
    """Represents a builtin (function).

    Attributes
    ----------
    call :
        The call node of the function.
    """

    call: astroid.Call

    def __str__(self) -> str:
        return f"{self.__class__.__name__}.{self.name}"

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

call: astroid.Call instance-attribute

__hash__()

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

__init__(node, id, name, call)

__str__()

Source code in src/library_analyzer/processing/api/purity_analysis/model/_module_data.py
def __str__(self) -> str:
    return f"{self.__class__.__name__}.{self.name}"