Fix: Extract can now deal with return statements at the end

This commit is contained in:
Dave Halter
2020-02-26 09:31:33 +01:00
parent c96994dd8d
commit a92c28840b
2 changed files with 53 additions and 12 deletions

View File

@@ -345,3 +345,29 @@ class X:
#? 11 text {'new_name': 'ab', 'until_line': 12, 'until_column': 28}
x = self.ab(b)
# bar
# -------------------------------------------------- in-method-range-2
glob1 = 1
class X:
# comment
def f(self, b, c):
#? 11 text {'new_name': 'ab', 'until_line': 11, 'until_column': 10}
#foo
local1 = 3
local2 = 4
return local1 * glob1 * b
# bar
# ++++++++++++++++++++++++++++++++++++++++++++++++++
glob1 = 1
class X:
# comment
def ab(self, b):
#foo
local1 = 3
local2 = 4
return local1 * glob1 * b
def f(self, b, c):
#? 11 text {'new_name': 'ab', 'until_line': 11, 'until_column': 10}
return self.ab(b)