forked from VimPlug/jedi
Fix for some small issues with the equals.
This commit is contained in:
@@ -370,7 +370,7 @@ class Completion(BaseDefinition):
|
|||||||
super(Completion, self).__init__(evaluator, name)
|
super(Completion, self).__init__(evaluator, name)
|
||||||
|
|
||||||
self._like_name_length = like_name_length
|
self._like_name_length = like_name_length
|
||||||
self.stack = stack
|
self._stack = stack
|
||||||
|
|
||||||
# Completion objects with the same Completion name (which means
|
# Completion objects with the same Completion name (which means
|
||||||
# duplicate items in the completion)
|
# duplicate items in the completion)
|
||||||
@@ -382,9 +382,8 @@ class Completion(BaseDefinition):
|
|||||||
and self.type == 'Function':
|
and self.type == 'Function':
|
||||||
append = '('
|
append = '('
|
||||||
|
|
||||||
if self.stack is not None:
|
if isinstance(self._definition, tree.Param) and self._stack is not None:
|
||||||
node_names = list(self.stack.get_node_names(self._evaluator.grammar))
|
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:
|
if 'trailer' in node_names and 'argument' not in node_names:
|
||||||
append += '='
|
append += '='
|
||||||
|
|
||||||
|
|||||||
@@ -118,13 +118,13 @@ class Completion:
|
|||||||
grammar, self._code_lines, self._module, self._position
|
grammar, self._code_lines, self._module, self._position
|
||||||
)
|
)
|
||||||
except helpers.OnErrorLeaf as e:
|
except helpers.OnErrorLeaf as e:
|
||||||
|
self.stack = None
|
||||||
if e.error_leaf.value == '.':
|
if e.error_leaf.value == '.':
|
||||||
# After ErrorLeaf's that are dots, we will not do any
|
# After ErrorLeaf's that are dots, we will not do any
|
||||||
# completions since this probably just confuses the user.
|
# completions since this probably just confuses the user.
|
||||||
return []
|
return []
|
||||||
# If we don't have a context, just use global completion.
|
# If we don't have a context, just use global completion.
|
||||||
|
|
||||||
self.stack = None
|
|
||||||
return self._global_completions()
|
return self._global_completions()
|
||||||
|
|
||||||
allowed_keywords, allowed_tokens = \
|
allowed_keywords, allowed_tokens = \
|
||||||
|
|||||||
Reference in New Issue
Block a user