Super

class astroid.objects.Super(mro_pointer: SuccessfulInferenceResult, mro_type: SuccessfulInferenceResult, self_class: scoped_nodes.ClassDef, scope: scoped_nodes.FunctionDef, call: node_classes.Call)[source]

Bases: NodeNG

Proxy class over a super call.

This class offers almost the same behaviour as Python’s super, which is MRO lookups for retrieving attributes from the parents.

The mro_pointer is the place in the MRO from where we should start looking, not counting it. mro_type is the object which provides the MRO, it can be both a type or an instance. self_class is the class where the super call is, while scope is the function where the super call is.

display_type() str[source]
getattr(name, context: InferenceContext | None = None)[source]
igetattr(name: str, context: InferenceContext | None = None) Iterator[InferenceResult][source]

Retrieve the inferred values of the given attribute name.

property name

Get the name of the MRO pointer.

pytype() Literal['builtins.super'][source]
qname() Literal['super'][source]
special_attributes
super_mro()[source]

Get the MRO which will be used to lookup attributes in this super.