forked from VimPlug/jedi
Removed base in completions
This commit is contained in:
@@ -205,12 +205,11 @@ class Script(object):
|
||||
if settings.case_insensitive_completion \
|
||||
and n.lower().startswith(like.lower()) \
|
||||
or n.startswith(like):
|
||||
if True: # TODO reinstate! not filter_private_variable(s, user_stmt or self._parser.user_scope(), n):
|
||||
if isinstance(c.parent, (pr.Function, pr.Class)):
|
||||
# TODO I think this is a hack. It should be an
|
||||
# er.Function/er.Class before that.
|
||||
c = er.wrap(self._evaluator, c.parent).name
|
||||
new = classes.Completion(self._evaluator, c, needs_dot, len(like), s)
|
||||
new = classes.Completion(self._evaluator, c, needs_dot, len(like))
|
||||
k = (new.name, new.complete) # key
|
||||
if k in comp_dct and settings.no_completion_duplicates:
|
||||
comp_dct[k]._same_name_completions.append(new)
|
||||
|
||||
@@ -365,12 +365,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, needs_dot, like_name_length, base):
|
||||
def __init__(self, evaluator, name, needs_dot, like_name_length):
|
||||
super(Completion, self).__init__(evaluator, name)
|
||||
|
||||
self._needs_dot = needs_dot
|
||||
self._like_name_length = like_name_length
|
||||
self._base = base
|
||||
|
||||
# Completion objects with the same Completion name (which means
|
||||
# duplicate items in the completion)
|
||||
@@ -384,9 +383,9 @@ class Completion(BaseDefinition):
|
||||
append = '('
|
||||
|
||||
if settings.add_dot_after_module:
|
||||
if isinstance(self._base, pr.Module):
|
||||
if isinstance(self._definition, pr.Module):
|
||||
append += '.'
|
||||
if isinstance(self._base, pr.Param):
|
||||
if isinstance(self._definition, pr.Param):
|
||||
append += '='
|
||||
|
||||
name = str(self._name)
|
||||
|
||||
Reference in New Issue
Block a user