class documentation

Undocumented

Method __hash__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __next__ Undocumented
Method dunder_lookup try to resolve the dunder method
Method get_return_type Undocumented
Method hash Undocumented
Method infer Undocumented
Method to_ast Specify how to convert this node to ast expression, to be used as test case comparison :return: ast node
Static Method _convert_dunder convert dunder method string to klara's specification :param dunder: dunder method in string, e.g. __str__ :return: converted dunder
Method _default_op Undocumented
Method _infer Undocumented
Method _infer_bool Undocumented
Method _infer_builtins Undocumented
Method _infer_unaryop Undocumented
Class Variable _fields Undocumented
Instance Variable _hash Undocumented
Instance Variable _infer_binop Undocumented
Instance Variable _infer_comp_op Undocumented

Inherited from Const:

Method __repr__ Undocumented
Method get_type get the type of the constant holding
Instance Variable value Undocumented

Inherited from BaseNode (via Const):

Static Method get_inferred Undocumented
Method __contains__ Undocumented
Method accept Undocumented
Method generic_visit Undocumented
Method get_bound_conditions Undocumented
Method get_children Undocumented
Method get_from_outer find the definition of `var` from outer scope recursively. Skip param will determine how many parent scope to skip :param var: variable of interest :param skip: how many layer of parent scope to skip :return:...
Method get_parent_of_type Undocumented
Method get_statements Undocumented
Method get_stmt_target Undocumented
Method get_target_instance get the assigning target instance rather than scope(). See #mr68u a.b.c = node calling node.get_target_instance() will return `a.b.c.instance()`
Method is_children check if the given node is part of 'self' or children
Method iter_fields Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` that is present on *node*.
Method prepare_inferred_value Undocumented
Method scope return the first containing scope
Method statement Undocumented
Instance Variable col_offset Undocumented
Instance Variable explicit_inference Undocumented
Instance Variable lineno Undocumented
Instance Variable parent Undocumented
Instance Variable refer_to_block Undocumented

Inherited from Proxy (via Const, BaseNode, BaseInstance):

Method __getattr__ Undocumented
Instance Variable obj Undocumented

Inherited from InvertCondMixin (via Const, BaseNode, BaseInstance, Proxy):

Method invert_condition Invert the condition of this node. wrap the node in `not()`
Method wrap_bool Undocumented
def __hash__(self): (source)
def __init__(self, value=None): (source)
def __iter__(self): (source)

Undocumented

def __next__(self): (source)

Undocumented

def dunder_lookup(self, method): (source)

try to resolve the dunder method

def get_return_type(self): (source)

Undocumented

def hash(self): (source)

Undocumented

def infer(self, context=None, inferred_attr=None): (source)

Undocumented

def to_ast(self): (source)

Specify how to convert this node to ast expression, to be used as test case comparison :return: ast node

Returns
ast.ASTUndocumented
@staticmethod
def _convert_dunder(dunder): (source)

convert dunder method string to klara's specification :param dunder: dunder method in string, e.g. __str__ :return: converted dunder

Parameters
dunder:strUndocumented
def _default_op(self, op, other, method_name, context=None, self_result=inference.InferenceResult): (source)

Undocumented

Parameters
op:strUndocumented
other:inference.InferenceResultUndocumented
method_name:strUndocumented
contextUndocumented
self_resultUndocumented
def _infer(self, context=None): (source)

Undocumented

def _infer_bool(self, context=None): (source)

Undocumented

def _infer_builtins(self, builtin, context): (source)

Undocumented

Parameters
builtin:strUndocumented
contextUndocumented
def _infer_unaryop(self, op, method_name, context=None): (source)

Undocumented

_hash = (source)

Undocumented

_infer_binop = (source)

Undocumented

_infer_comp_op = (source)

Undocumented