mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 15:51:51 +08:00
dynamic param completion works now better with subcalls of statements
This commit is contained in:
@@ -119,7 +119,11 @@ def search_params(param):
|
||||
|
||||
for stmt in possible_stmts:
|
||||
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
|
||||
|
||||
result = []
|
||||
|
||||
@@ -25,6 +25,10 @@ def func(a):
|
||||
#?
|
||||
return a
|
||||
|
||||
def func(a):
|
||||
#? float()
|
||||
return a
|
||||
str(func(1.0))
|
||||
|
||||
# -----------------
|
||||
# *args, **args
|
||||
|
||||
Reference in New Issue
Block a user