implemented W0232: Class has no __init__ method

extracted logic for "add element to statement list" into PyUtil
reused in PyMoveAttributeToInitQuickFix and PyClassHasNoInitInspection

reused AddMethodQuickFix in PyClassHasNoInitInspection
This commit is contained in:
Ekaterina Tuzova
2013-03-22 14:13:18 +04:00
parent e6d9c74ab2
commit eafde14771
22 changed files with 228 additions and 85 deletions
@@ -0,0 +1,11 @@
class A:
def __init__(self):
self.x = 1
def foo(self, a):
self.<caret><warning descr="Unresolved attribute reference 'y' for class 'A'">y</warning>(1, a)
# Some comment
class B:
pass