dynamic param completion works now better with subcalls of statements

This commit is contained in:
David Halter
2012-09-29 18:40:09 +02:00
parent 99cd894a7b
commit 445132d898
2 changed files with 9 additions and 1 deletions

View File

@@ -119,7 +119,11 @@ def search_params(param):
for stmt in possible_stmts: for stmt in possible_stmts:
if not isinstance(stmt, parsing.Import): if not isinstance(stmt, parsing.Import):
evaluate.follow_statement(stmt) calls = _scan_array(stmt.get_assignment_calls(), func_name)
for c in calls:
# no execution means that params cannot be set
if c.execution:
evaluate.follow_call(c)
return listener.param_possibilities return listener.param_possibilities
result = [] result = []

View File

@@ -25,6 +25,10 @@ def func(a):
#? #?
return a return a
def func(a):
#? float()
return a
str(func(1.0))
# ----------------- # -----------------
# *args, **args # *args, **args