Implement inline refactorings

This commit is contained in:
Dave Halter
2020-02-14 13:53:41 +01:00
parent b4628abc60
commit 0a3ff6bd70
3 changed files with 77 additions and 11 deletions

View File

@@ -1,20 +1,28 @@
# -------------------------------------------------- simple-1
# -------------------------------------------------- simple
def test():
#? 4
a = (30 + b, c) + 1
return test(100, a)
# ++++++++++++++++++++++++++++++++++++++++++++++++++
def test():
#? 4
return test(100, (30 + b, c) + 1)
# -------------------------------------------------- simple-2
--- /home/dave/source/jedi/test/refactor/inline.py
+++ /home/dave/source/jedi/test/refactor/inline.py
@@ -1,5 +1,4 @@
def test():
#? 4
- a = (30 + b, c) + 1
- return test(100, a)
+ return test(100, (30 + b, c) + 1)
# -------------------------------------------------- tuple
if 1:
#? 4
a = 1, 2
return test(100, a)
# ++++++++++++++++++++++++++++++++++++++++++++++++++
if 1:
#? 4
return test(100, (1, 2))
--- /home/dave/source/jedi/test/refactor/inline.py
+++ /home/dave/source/jedi/test/refactor/inline.py
@@ -1,5 +1,4 @@
if 1:
#? 4
- a = 1, 2
- return test(100, a)
+ return test(100, (1, 2))