mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Make sure that extract variable works for some ranges
This commit is contained in:
@@ -119,3 +119,38 @@ x + 1, 3
|
||||
#? 4 text {'new_name': 'x'}
|
||||
x = x + 1
|
||||
x, 3
|
||||
# -------------------------------------------------- range-1
|
||||
#? 4 text {'new_name': 'x', 'until_column': 9}
|
||||
y + 1, 3
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#? 4 text {'new_name': 'x', 'until_column': 9}
|
||||
x = y + 1, 3
|
||||
x
|
||||
# -------------------------------------------------- range-2
|
||||
#? 1 text {'new_name': 'x', 'until_column': 3}
|
||||
y + 1, 3
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#? 1 text {'new_name': 'x', 'until_column': 3}
|
||||
x = y + 1
|
||||
x, 3
|
||||
# -------------------------------------------------- range-3
|
||||
#? 1 text {'new_name': 'x', 'until_column': 6}
|
||||
y + 1, 3
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#? 1 text {'new_name': 'x', 'until_column': 6}
|
||||
x = y + 1
|
||||
x, 3
|
||||
# -------------------------------------------------- range-4
|
||||
#? 1 text {'new_name': 'x', 'until_column': 1}
|
||||
y + 1, 3
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#? 1 text {'new_name': 'x', 'until_column': 1}
|
||||
x = y
|
||||
x + 1, 3
|
||||
# -------------------------------------------------- range-5
|
||||
#? 0 text {'new_name': 'x', 'until_column': 1}
|
||||
y + 1, 3
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#? 0 text {'new_name': 'x', 'until_column': 1}
|
||||
x = y
|
||||
x + 1, 3
|
||||
|
||||
Reference in New Issue
Block a user