1
0
forked from VimPlug/jedi

Implement Script.complete_search instead of the complete param and return Completion objects

This commit is contained in:
Dave Halter
2020-03-09 23:55:17 +01:00
parent cf3d83ee4f
commit d838eaecd2
3 changed files with 35 additions and 8 deletions

View File

@@ -604,6 +604,14 @@ def search_in_module(inference_state, module_context, names, wanted_names,
if convert:
names = convert_names(names)
for n2 in names:
def_ = classes.Definition(inference_state, n2)
if complete:
def_ = classes.Completion(
inference_state, n2,
stack=None,
like_name_length=len(last_name),
is_fuzzy=fuzzy,
)
else:
def_ = classes.Definition(inference_state, n2)
if not wanted_type or wanted_type == def_.type:
yield def_