forked from VimPlug/jedi
Fix the issues with added equals after params in the wrong places. Fixes #643.
This commit is contained in:
@@ -366,10 +366,11 @@ class Completion(BaseDefinition):
|
||||
`Completion` objects are returned from :meth:`api.Script.completions`. They
|
||||
provide additional information about a completion.
|
||||
"""
|
||||
def __init__(self, evaluator, name, like_name_length):
|
||||
def __init__(self, evaluator, name, stack, like_name_length):
|
||||
super(Completion, self).__init__(evaluator, name)
|
||||
|
||||
self._like_name_length = like_name_length
|
||||
self.stack = stack
|
||||
|
||||
# Completion objects with the same Completion name (which means
|
||||
# duplicate items in the completion)
|
||||
@@ -381,8 +382,11 @@ class Completion(BaseDefinition):
|
||||
and self.type == 'Function':
|
||||
append = '('
|
||||
|
||||
if isinstance(self._definition, tree.Param):
|
||||
append += '='
|
||||
if self.stack is not None:
|
||||
node_names = list(self.stack.get_node_names(self._evaluator.grammar))
|
||||
print(node_names)
|
||||
if 'trailer' in node_names and 'argument' not in node_names:
|
||||
append += '='
|
||||
|
||||
name = str(self._name)
|
||||
if like_name:
|
||||
|
||||
Reference in New Issue
Block a user