MCPcopy Create free account
hub / github.com/LabPy/lantz / __init__

Method __init__

lantz/utils/qt.py:55–66  ·  view source on GitHub ↗
(self, *args, **kw)

Source from the content-addressed store, hash-verified

53 return inst
54
55 def __init__(self, *args, **kw):
56 # Emulate super by calling the next method in the MRO, if there is one.
57 mro = self.__class__.mro()
58 for qt_class in QtCore.QObject.mro():
59 mro.remove(qt_class)
60 next_index = mro.index(SuperQObject) + 1
61 if next_index < len(mro):
62 init = mro[next_index].__init__
63 if init is object.__init__:
64 init(self)
65 else:
66 init(self, *args, **kw)
67
68
69MetaQObject = type(QtCore.QObject)

Callers 1

__new__Method · 0.45

Calls 1

indexMethod · 0.80

Tested by

no test coverage detected