Module MRO

Classes and predicates for computing the Method Resolution Order (MRO) of classes. Supports both old-style (diamond) inheritance and new-style (C3 linearization) inheritance.

Import path

semmle.python.pointsto.MRO

Imports

PointsTo

Part of the combined points-to, call-graph and type-inference library. The main relation points_to(node, context, object, cls, origin) relates a control flow node to the possible objects it points-to the inferred types of those objects and the ‘origin’ of those objects. The ‘origin’ is the point in source code that the object can be traced back to.

python

Predicates

Classes

ClassList

A list of classes, used to represent the MRO of a class