diff --git a/python/src/com/jetbrains/python/inspections/PyClassHasNoInitInspection.java b/python/src/com/jetbrains/python/inspections/PyClassHasNoInitInspection.java index c7dfb09a8512..56e0e1f90183 100644 --- a/python/src/com/jetbrains/python/inspections/PyClassHasNoInitInspection.java +++ b/python/src/com/jetbrains/python/inspections/PyClassHasNoInitInspection.java @@ -53,13 +53,6 @@ public class PyClassHasNoInitInspection extends PyInspection { registerProblem(node.getNameIdentifier(), PyBundle.message("INSP.class.has.no.init"), new AddMethodQuickFix("__init__", new PyClassTypeImpl(node, false), false)); } - for (PyClass ancestor : node.getAncestorClasses(myTypeEvalContext)) { - final PyFunction ancestorInit = ancestor.findInitOrNew(false); - if (ancestorInit == null) { - registerProblem(node.getNameIdentifier(), PyBundle.message("INSP.parent.$0.has.no.init", ancestor.getName()), - new AddMethodQuickFix("__init__", new PyClassTypeImpl(ancestor, false), false)); - } - } } } } \ No newline at end of file diff --git a/python/testData/inspections/PyClassHasNoInitInspection/parentClass.py b/python/testData/inspections/PyClassHasNoInitInspection/parentClass.py index b28f8965302b..4fca91af54eb 100644 --- a/python/testData/inspections/PyClassHasNoInitInspection/parentClass.py +++ b/python/testData/inspections/PyClassHasNoInitInspection/parentClass.py @@ -3,7 +3,7 @@ class A: def foo(self): self.b = 1 -class B(A): +class B(A): def __init__(self): self.b = 2