mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-9365 Make function from method: leads to unresolved attribute reference for method usages in class
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ public class PyMakeFunctionFromMethodQuickFix implements LocalQuickFix {
|
||||
PyClass aClass = PsiTreeUtil.getTopmostParentOfType(containingClass, PyClass.class);
|
||||
if (aClass == null)
|
||||
aClass = containingClass;
|
||||
copy = file.addAfter(copy, aClass);
|
||||
copy = file.addBefore(copy, aClass);
|
||||
|
||||
for (UsageInfo usage : usages) {
|
||||
final PsiElement usageElement = usage.getElement();
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
|
||||
def f():
|
||||
test = 1
|
||||
|
||||
|
||||
class Child(Base):
|
||||
def __init__(self):
|
||||
super(Child, self).__init__()
|
||||
|
||||
|
||||
def f():
|
||||
test = 1
|
||||
+5
-4
@@ -1,8 +1,9 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
class Child(Base):
|
||||
pass
|
||||
|
||||
|
||||
def f():
|
||||
test = 1
|
||||
test = 1
|
||||
|
||||
|
||||
class Child(Base):
|
||||
pass
|
||||
+5
-4
@@ -1,10 +1,11 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
class Child(Base):
|
||||
def __init__(self):
|
||||
super(Child, self).__init__()
|
||||
|
||||
|
||||
def f(x):
|
||||
test = 1
|
||||
|
||||
|
||||
class Child(Base):
|
||||
def __init__(self):
|
||||
super(Child, self).__init__()
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
class Child(Base):
|
||||
pass
|
||||
|
||||
|
||||
def f():
|
||||
test = 1
|
||||
test = 1
|
||||
|
||||
|
||||
class Child(Base):
|
||||
pass
|
||||
@@ -1,9 +1,11 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
|
||||
def f():
|
||||
test = 1
|
||||
|
||||
|
||||
class Child(Base):
|
||||
def __init__(self):
|
||||
super(Child, self).__init__()
|
||||
|
||||
|
||||
def f():
|
||||
test = 1
|
||||
@@ -1,9 +1,11 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
|
||||
def f(x):
|
||||
test = 1
|
||||
|
||||
|
||||
class Child(Base):
|
||||
def __init__(self):
|
||||
super(Child, self).__init__()
|
||||
|
||||
|
||||
def f(x):
|
||||
test = 1
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
class A: pass
|
||||
|
||||
|
||||
def foo():
|
||||
print("Hello Pycharm!")
|
||||
|
||||
|
||||
class A: pass
|
||||
|
||||
|
||||
foo()
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
class A: pass
|
||||
|
||||
|
||||
def m():
|
||||
print 1
|
||||
|
||||
|
||||
class A: pass
|
||||
|
||||
|
||||
b = A()
|
||||
a = m()
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
class A: pass
|
||||
|
||||
|
||||
def m(x):
|
||||
print 1
|
||||
|
||||
|
||||
class A: pass
|
||||
|
||||
|
||||
m(1)
|
||||
@@ -1,7 +1,8 @@
|
||||
def method2():
|
||||
print 1
|
||||
|
||||
|
||||
class A():
|
||||
def method(self):
|
||||
method2()
|
||||
|
||||
|
||||
def method2():
|
||||
print 1
|
||||
Reference in New Issue
Block a user