Fix extract: better input filtering

This commit is contained in:
Dave Halter
2020-02-26 00:59:04 +01:00
parent bf9a3a4ca8
commit bb6f0d5e91
2 changed files with 37 additions and 8 deletions

View File

@@ -227,7 +227,7 @@ def x(v1):
# ++++++++++++++++++++++++++++++++++++++++++++++++++
import os
# comment1
def a(v1, v2, v3):
def a(v1, v3):
v2 = 2
if 1:
x, y = os.listdir(v1 + v2 * v3)
@@ -239,7 +239,7 @@ def a(v1, v2, v3):
def x(v1):
#foo
#? 2 text {'new_name': 'a', 'until_line': 9, 'until_column': 5}
x, y = a(v1, v2, v3)
x, y = a(v1, v3)
#bar
return x, y
# -------------------------------------------------- with-range-func-2
@@ -259,7 +259,7 @@ x
import os
# comment1
# comment2
def a(v1, v2, v3):
def a(v1, v3):
#foo
v2 = 2
if 1:
@@ -270,7 +270,7 @@ def a(v1, v2, v3):
def x(v1):
#? 2 text {'new_name': 'a', 'until_line': 10, 'until_column': 0}
y = a(v1, v2, v3)
y = a(v1, v3)
return y
x
# -------------------------------------------------- with-range-func-3
@@ -298,3 +298,18 @@ def x(v1):
#bar
return x
x
# -------------------------------------------------- in-class-1
class X1:
#? 11 text {'new_name': 'f', 'until_line': 4}
a = 3
c = a + 2
# ++++++++++++++++++++++++++++++++++++++++++++++++++
def f():
a = 3
c = a + 2
return c
class X1:
#? 11 text {'new_name': 'f', 'until_line': 4}
c = f()