forked from VimPlug/jedi
Care better about stubs for code search
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
from jedi._compatibility import unicode, force_unicode, all_suffixes
|
||||
from jedi.inference.cache import inference_state_method_cache
|
||||
@@ -254,7 +255,9 @@ def transform_path_to_dotted(sys_path, module_path):
|
||||
# is very strange and is probably a file that is called
|
||||
# `.py`.
|
||||
return
|
||||
yield tuple(split)
|
||||
# Stub folders for foo can end with foo-stubs. Just remove
|
||||
# it.
|
||||
yield tuple(re.sub(r'-stubs$', '', s) for s in split)
|
||||
|
||||
potential_solutions = tuple(iter_potential_solutions())
|
||||
if not potential_solutions:
|
||||
|
||||
Reference in New Issue
Block a user