moved python smart copy-paste logic to python module

so fixed PY-8982, PY-7709, PY-7470, PY-6994, PY-6992, PY-6987, PY-6888
This commit is contained in:
Ekaterina Tuzova
2013-03-07 18:40:27 +04:00
parent 78a7f66840
commit ca83eb89e0
32 changed files with 224 additions and 126 deletions
+4
View File
@@ -0,0 +1,4 @@
class A:
a = 1
b = 2
+3
View File
@@ -0,0 +1,3 @@
class A:
a = 1<caret>
b = 2
+2
View File
@@ -0,0 +1,2 @@
<selection>
</selection>
@@ -1,6 +1,4 @@
def bar():
x = 1
y = 2
var = "string"
@@ -0,0 +1,7 @@
def g():
if True:
pass
else:
pass
b = 1
@@ -0,0 +1,3 @@
def g():
<selection>a = 1</selection><caret>
b = 1
@@ -0,0 +1,5 @@
<selection>if True:
pass
else:
pass
</selection>
@@ -0,0 +1,4 @@
a = 1
# some comment
b = 2
@@ -0,0 +1,4 @@
a = 1
<caret>
b = 2
@@ -0,0 +1,4 @@
a = 1
<selection># some comment</selection>
b = 2
@@ -0,0 +1,4 @@
a = 1
a = 1
b = 1
d = 1
@@ -0,0 +1,4 @@
a = 1
<selection>b = 1
c = 1
</selection><caret>d = 1
@@ -0,0 +1,4 @@
<selection>a = 1
b = 1
</selection>c = 1
d = 1
+2 -2
View File
@@ -1,5 +1,5 @@
class Test:
def __init__(self):
def __init__(self):
print "Line 1"
print "Line 1"
print "Line 1"
+3 -3
View File
@@ -1,4 +1,4 @@
class Test:
def __init__(self):
<caret>
print "Line 1"
def __init__(self):
<caret>
print "Line 1"
+2 -2
View File
@@ -1,4 +1,4 @@
class Test:
def __init__(self):
<selection> print "Line 1"
def __init__(self):
<selection> print "Line 1"
</selection><caret>
@@ -6,4 +6,3 @@ class A(object):
def foo(self):
pass
@@ -6,4 +6,4 @@ if True:
def f():
if True:
a = 1
b = 2
b = 2
@@ -6,4 +6,4 @@ if True:
def f():
if True:
a = 1
b = 2
b = 2
@@ -3,5 +3,4 @@ filter(Q(myfield=123),
Q(myanotherfield=321))
a = filter(Q(myfield=123),
Q(myanotherfield=321))
Q(myanotherfield=321))
@@ -2,4 +2,5 @@ def f():
if True:
c = 1
a = 1
@@ -2,6 +2,8 @@ class C:
def foo(self):
x = 1
y = 2
def foo(self):
x = 1
y = 2
@@ -6,5 +6,6 @@ class C:
x = 1
y = 2
def bar(self):
y = 2
@@ -1,6 +1,7 @@
def foo(self):
x = 1
y = 2
def foo(self):
x = 1
y = 2
@@ -1,8 +1,10 @@
def foo(self):
x = 1
y = 2
def foo(self):
x = 1
y = 2
def foo(self):
x = 1
y = 2
z = 3
@@ -2,4 +2,4 @@ def f(self):
x = 1
if True:
b = 2
x = 1
x = 1
@@ -3,6 +3,7 @@ class C:
x = 1
y = 2
x = 1
def foo():
pass