1
0
forked from VimPlug/jedi

fixed some exceptions -> mostly related to used_names access of module

This commit is contained in:
David Halter
2012-09-27 09:37:23 +02:00
parent 908d019390
commit 1ae2a36838
2 changed files with 24 additions and 12 deletions

View File

@@ -118,7 +118,8 @@ def search_params(param):
return []
for stmt in possible_stmts:
evaluate.follow_statement(stmt)
if not isinstance(stmt, parsing.Import):
evaluate.follow_statement(stmt)
return listener.param_possibilities
result = []
@@ -126,7 +127,6 @@ def search_params(param):
for p in params:
if str(p) == param_name:
result += evaluate.follow_statement(p.parent())
return result
func = param.get_parent_until(parsing.Function)
@@ -147,6 +147,8 @@ def search_params(param):
listener = ParamListener()
func.listeners.add(listener)
result = []
# This is like backtracking: Get the first possible result.
for mod in get_directory_modules_for_name([current_module], func_name):
result = get_params_for_module(mod)
if result: