mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Fix extract: better input filtering
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user