1
0
forked from VimPlug/jedi

Fix some signature matching for methods

This commit is contained in:
Dave Halter
2018-09-18 23:48:26 +02:00
parent 1b11162132
commit 57fa5f5bd9
6 changed files with 28 additions and 19 deletions

View File

@@ -328,13 +328,16 @@ def signature_matches(function_context, arguments):
key, argument = next(unpacked_arguments, (None, None))
if argument is None:
# This signature has an parameter more than arguments were given.
return False
return bool(param_node.star_count)
if key is not None:
# TODO this is obviously wrong, we cannot just ignore keyword
# arguments, but it's easier for now.
return False
if param_node.annotation is not None:
if param_node.star_count == 2:
return False # TODO allow this
annotation_contexts = function_context.evaluator.eval_element(
function_context.parent_context,
param_node.annotation