mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-3055 Missing super constructor call Inspection
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
class A(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
class AA(A):
|
||||
def __init__(self):
|
||||
A.__init__(self)
|
||||
print("Constructor AA was called")
|
||||
|
||||
class B(A):
|
||||
def <warning descr="Call to constructor of super class is missed">__init__</warning>(self):
|
||||
print("Constructor B was called")
|
||||
|
||||
class C(B):
|
||||
def __init__(self):
|
||||
super(C, self).__init__()
|
||||
print("Constructor C was called")
|
||||
|
||||
|
||||
class A:
|
||||
def __init__(self):
|
||||
print("A __init__")
|
||||
|
||||
|
||||
class B(A):
|
||||
def __init__(self):
|
||||
A.__init__(self)
|
||||
print("Constructor B was called")
|
||||
|
||||
class C(B):
|
||||
def <warning descr="Call to constructor of super class is missed">__init__</warning>(self):
|
||||
print("Constructor C was called")
|
||||
|
||||
class D(A):
|
||||
def __init__(self):
|
||||
if True:
|
||||
A.__init__(self)
|
||||
print("Constructor D was called")
|
||||
Reference in New Issue
Block a user