forked from VimPlug/jedi
Remove needs_dot and settings.add_dot_after_module. Both are not really used anymore with context completions anymore.
Also the setting doesn't seem to be used anywhere as far as I can tell.
This commit is contained in:
@@ -365,10 +365,9 @@ class Completion(BaseDefinition):
|
||||
`Completion` objects are returned from :meth:`api.Script.completions`. They
|
||||
provide additional information about a completion.
|
||||
"""
|
||||
def __init__(self, evaluator, name, needs_dot, like_name_length):
|
||||
def __init__(self, evaluator, name, like_name_length):
|
||||
super(Completion, self).__init__(evaluator, name)
|
||||
|
||||
self._needs_dot = needs_dot
|
||||
self._like_name_length = like_name_length
|
||||
|
||||
# Completion objects with the same Completion name (which means
|
||||
@@ -376,22 +375,18 @@ class Completion(BaseDefinition):
|
||||
self._same_name_completions = []
|
||||
|
||||
def _complete(self, like_name):
|
||||
dot = '.' if self._needs_dot else ''
|
||||
append = ''
|
||||
if settings.add_bracket_after_function \
|
||||
and self.type == 'Function':
|
||||
append = '('
|
||||
|
||||
if settings.add_dot_after_module:
|
||||
if isinstance(self._definition, tree.Module):
|
||||
append += '.'
|
||||
if isinstance(self._definition, tree.Param):
|
||||
append += '='
|
||||
|
||||
name = str(self._name)
|
||||
if like_name:
|
||||
name = name[self._like_name_length:]
|
||||
return dot + name + append
|
||||
return name + append
|
||||
|
||||
@property
|
||||
def complete(self):
|
||||
|
||||
Reference in New Issue
Block a user