mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-19 23:09:43 +08:00
A last change for defaults. Params are pretty usable and work smooth now.
This commit is contained in:
@@ -178,7 +178,8 @@ def get_params(evaluator, func, var_args):
|
|||||||
# args / kwargs will just be empty arrays / dicts, respectively.
|
# args / kwargs will just be empty arrays / dicts, respectively.
|
||||||
# Wrong value count is just ignored. If you try to test cases that are
|
# Wrong value count is just ignored. If you try to test cases that are
|
||||||
# not allowed in Python, Jedi will maybe not show any completions.
|
# not allowed in Python, Jedi will maybe not show any completions.
|
||||||
key, va_values = next(var_arg_iterator, (None, [param.default]))
|
default = [] if param.default is None else [param.default]
|
||||||
|
key, va_values = next(var_arg_iterator, (None, default))
|
||||||
while key is not None:
|
while key is not None:
|
||||||
keys_only = True
|
keys_only = True
|
||||||
k = unicode(key)
|
k = unicode(key)
|
||||||
@@ -202,8 +203,6 @@ def get_params(evaluator, func, var_args):
|
|||||||
keys_used.add(k)
|
keys_used.add(k)
|
||||||
key, va_values = next(var_arg_iterator, (None, ()))
|
key, va_values = next(var_arg_iterator, (None, ()))
|
||||||
|
|
||||||
if keys_only:
|
|
||||||
break
|
|
||||||
|
|
||||||
keys = []
|
keys = []
|
||||||
values = []
|
values = []
|
||||||
|
|||||||
Reference in New Issue
Block a user