mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-296 'Move statement up/down' on method name line should move the whole method
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
class A:
|
||||
def f(self, a, b):
|
||||
if a:
|
||||
b = 1
|
||||
elif b:
|
||||
a = <caret>1
|
||||
else:
|
||||
print "a"
|
||||
@@ -0,0 +1,9 @@
|
||||
class A:
|
||||
def f(self, a, b):
|
||||
if a:
|
||||
b = 1
|
||||
elif b:
|
||||
pass
|
||||
else:
|
||||
a = 1
|
||||
print "a"
|
||||
@@ -0,0 +1,9 @@
|
||||
class A:
|
||||
def f(self, a, b):
|
||||
if a:
|
||||
b = 1
|
||||
a = 1
|
||||
elif b:
|
||||
pass
|
||||
else:
|
||||
print "a"
|
||||
@@ -0,0 +1,9 @@
|
||||
class A:
|
||||
def a(self):
|
||||
doSomething()
|
||||
|
||||
def b<caret>(self):
|
||||
doSomething()
|
||||
|
||||
def c(self):
|
||||
doSomething()
|
||||
@@ -0,0 +1,9 @@
|
||||
class A:
|
||||
def a(self):
|
||||
doSomething()
|
||||
|
||||
def c(self):
|
||||
doSomething()
|
||||
|
||||
def b(self):
|
||||
doSomething()
|
||||
@@ -0,0 +1,9 @@
|
||||
class A:
|
||||
def b(self):
|
||||
doSomething()
|
||||
|
||||
def a(self):
|
||||
doSomething()
|
||||
|
||||
def c(self):
|
||||
doSomething()
|
||||
@@ -0,0 +1,8 @@
|
||||
def foo(a, b):
|
||||
if a:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
a = <caret>3
|
||||
if b:
|
||||
pass
|
||||
@@ -0,0 +1,7 @@
|
||||
def foo(a, b):
|
||||
if a:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if b:
|
||||
a = 3
|
||||
@@ -0,0 +1,7 @@
|
||||
def foo(a, b):
|
||||
if a:
|
||||
pass
|
||||
else:
|
||||
a = 3
|
||||
if b:
|
||||
pass
|
||||
@@ -0,0 +1,12 @@
|
||||
class A:
|
||||
def f(self, a, b):
|
||||
while a:
|
||||
a = a / 2
|
||||
if a:
|
||||
b = 1
|
||||
elif<caret> b:
|
||||
a = 1
|
||||
else:
|
||||
print "a"
|
||||
for i in range(1, 10):
|
||||
print i
|
||||
@@ -0,0 +1,12 @@
|
||||
class A:
|
||||
def f(self, a, b):
|
||||
while a:
|
||||
a = a / 2
|
||||
for i in range(1, 10):
|
||||
if a:
|
||||
b = 1
|
||||
elif b:
|
||||
a = 1
|
||||
else:
|
||||
print "a"
|
||||
print i
|
||||
@@ -0,0 +1,12 @@
|
||||
class A:
|
||||
def f(self, a, b):
|
||||
while a:
|
||||
if a:
|
||||
b = 1
|
||||
elif b:
|
||||
a = 1
|
||||
else:
|
||||
print "a"
|
||||
a = a / 2
|
||||
for i in range(1, 10):
|
||||
print i
|
||||
@@ -0,0 +1,6 @@
|
||||
a = 1
|
||||
|
||||
if a:
|
||||
a <caret>= 3
|
||||
|
||||
a = 4
|
||||
@@ -0,0 +1,7 @@
|
||||
a = 1
|
||||
|
||||
if a:
|
||||
pass
|
||||
|
||||
a = 4
|
||||
a = 3
|
||||
@@ -0,0 +1,7 @@
|
||||
a = 1
|
||||
|
||||
a = 3
|
||||
if a:
|
||||
pass
|
||||
|
||||
a = 4
|
||||
@@ -0,0 +1,11 @@
|
||||
def f(a, b, c):
|
||||
if b:
|
||||
pass
|
||||
elif a:
|
||||
c = <selection>1
|
||||
if b:
|
||||
a = 3
|
||||
else:
|
||||
b<caret></selection> = 4
|
||||
else:
|
||||
pass
|
||||
@@ -0,0 +1,11 @@
|
||||
def f(a, b, c):
|
||||
if b:
|
||||
pass
|
||||
elif a:
|
||||
pass
|
||||
else:
|
||||
c = <selection>1
|
||||
if b:
|
||||
a = 3
|
||||
else:
|
||||
b</selection> = 4
|
||||
@@ -0,0 +1,11 @@
|
||||
def f(a, b, c):
|
||||
if b:
|
||||
c = <selection>1
|
||||
if b:
|
||||
a = 3
|
||||
else:
|
||||
b</selection> = 4
|
||||
elif a:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
@@ -0,0 +1,2 @@
|
||||
a =<caret> 1
|
||||
b = 2
|
||||
@@ -0,0 +1,2 @@
|
||||
b = 2
|
||||
a = 1
|
||||
@@ -0,0 +1,2 @@
|
||||
a = 1
|
||||
b = 2
|
||||
Reference in New Issue
Block a user