forked from VimPlug/jedi
fuzzy_match and start_match are now match with fuzzy param
This commit is contained in:
@@ -3,7 +3,7 @@ import os
|
||||
from jedi._compatibility import FileNotFoundError, force_unicode, scandir
|
||||
from jedi.api import classes
|
||||
from jedi.api.strings import StringName, get_quote_ending
|
||||
from jedi.api.helpers import fuzzy_match, start_match
|
||||
from jedi.api.helpers import match
|
||||
from jedi.inference.helpers import get_str_or_none
|
||||
|
||||
|
||||
@@ -42,11 +42,7 @@ def complete_file_name(inference_state, module_context, start_leaf, string,
|
||||
return
|
||||
for entry in listed:
|
||||
name = entry.name
|
||||
if fuzzy:
|
||||
match = fuzzy_match(name, must_start_with)
|
||||
else:
|
||||
match = start_match(name, must_start_with)
|
||||
if match:
|
||||
if match(name, must_start_with, fuzzy=fuzzy):
|
||||
if is_in_os_path_join or not entry.is_dir():
|
||||
name += get_quote_ending(start_leaf.value, code_lines, position)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user