forked from VimPlug/jedi
Fix REPL completion param name completion
There were two issues: 1. The filter for parameters was wrong 2. In general the equal sign would not be added in some circumstances
This commit is contained in:
@@ -406,7 +406,7 @@ class Completion(BaseDefinition):
|
||||
and self.type == 'Function':
|
||||
append = '('
|
||||
|
||||
if isinstance(self._name, ParamName) and self._stack is not None:
|
||||
if self._name.api_type == 'param' and self._stack is not None:
|
||||
node_names = list(self._stack.get_node_names(self._evaluator.grammar._pgen_grammar))
|
||||
if 'trailer' in node_names and 'argument' not in node_names:
|
||||
append += '='
|
||||
|
||||
@@ -25,8 +25,10 @@ def get_call_signature_param_names(call_signatures):
|
||||
# public API and we don't want to make the internal
|
||||
# Name object public.
|
||||
tree_param = tree.search_ancestor(tree_name, 'param')
|
||||
if tree_param.star_count == 0: # no *args/**kwargs
|
||||
yield p._name
|
||||
if tree_param.star_count != 0: # no *args/**kwargs
|
||||
continue
|
||||
|
||||
yield p._name
|
||||
|
||||
|
||||
def filter_names(evaluator, completion_names, stack, like_name):
|
||||
|
||||
Reference in New Issue
Block a user