mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Fix params, so that quite a few functions can now pass.
This commit is contained in:
@@ -87,7 +87,6 @@ class NameFinder(object):
|
|||||||
|
|
||||||
stmt = name.get_definition()
|
stmt = name.get_definition()
|
||||||
scope = stmt.parent
|
scope = stmt.parent
|
||||||
print(name.parent, stmt, scope)
|
|
||||||
if scope in break_scopes:
|
if scope in break_scopes:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -342,7 +341,8 @@ class NameFinder(object):
|
|||||||
# this means that there are no default params,
|
# this means that there are no default params,
|
||||||
# so just ignore it.
|
# so just ignore it.
|
||||||
return res_new
|
return res_new
|
||||||
return res_new + evaluator.eval_statement(param, seek_name=unicode(self.name_str))
|
return res_new + list(chain.from_iterable(evaluator.eval_element(v)
|
||||||
|
for v in param.values))
|
||||||
|
|
||||||
def _handle_for_loops(self, loop):
|
def _handle_for_loops(self, loop):
|
||||||
# Take the first statement (for has always only one`in`).
|
# Take the first statement (for has always only one`in`).
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ def _gen_param_name_copy(evaluator, func, var_args, param, keys=(), values=(), a
|
|||||||
arr.type = array_type
|
arr.type = array_type
|
||||||
"""
|
"""
|
||||||
|
|
||||||
new_param = ExecutedParam.from_param([arr], param, parent, var_args)
|
new_param = ExecutedParam.from_param(values, param, parent, var_args)
|
||||||
|
|
||||||
|
|
||||||
name = copy.copy(param.get_name())
|
name = copy.copy(param.get_name())
|
||||||
|
|||||||
Reference in New Issue
Block a user