mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
First implementation of extract variable
This commit is contained in:
@@ -1,51 +1,40 @@
|
||||
# -------------------------------------------------- simple-1
|
||||
def test():
|
||||
#? 35 {'new_name': 'a'}
|
||||
#? 35 text {'new_name': 'a'}
|
||||
return test(100, (30 + b, c) + 1)
|
||||
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def test():
|
||||
#? 35 {'new_name': 'a'}
|
||||
#? 35 text {'new_name': 'a'}
|
||||
a = (30 + b, c) + 1
|
||||
return test(100, a)
|
||||
|
||||
|
||||
# -------------------------------------------------- simple-2
|
||||
def test():
|
||||
#? 25 {'new_name': 'a'}
|
||||
#? 25 text {'new_name': 'a'}
|
||||
return test(100, (30 + b, c) + 1)
|
||||
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def test():
|
||||
#? 25 {'new_name': 'a'}
|
||||
#? 25 text {'new_name': 'a'}
|
||||
a = 30 + b
|
||||
return test(100, (a, c) + 1)
|
||||
|
||||
|
||||
# -------------------------------------------------- multiline-1
|
||||
def test():
|
||||
#? 30 {'new_name': 'a'}
|
||||
#? 30 text {'new_name': 'x'}
|
||||
return test(1, (30 + b, c)
|
||||
+ 1)
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def test():
|
||||
#? 30 {'new_name': 'a'}
|
||||
x = ((30 + b, c)
|
||||
+ 1)
|
||||
return test(1, x
|
||||
)
|
||||
|
||||
|
||||
#? 30 text {'new_name': 'x'}
|
||||
x = (30 + b, c)
|
||||
+ 1
|
||||
return test(1, x)
|
||||
# -------------------------------------------------- multiline-2
|
||||
def test():
|
||||
#? 25 {'new_name': 'a'}
|
||||
#? 25 text {'new_name': 'x'}
|
||||
return test(1, (30 + b, c)
|
||||
+ 1)
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def test():
|
||||
#? 25 {'new_name': 'a'}
|
||||
#? 25 text {'new_name': 'x'}
|
||||
x = 30 + b
|
||||
return test(1, (x, c)
|
||||
+ 1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user