1
0
forked from VimPlug/jedi

Use sub_module_dict for completing modules, not its own function

This commit is contained in:
Dave Halter
2019-05-06 09:19:33 +02:00
parent afced5014c
commit c675e85d69
4 changed files with 25 additions and 24 deletions
+10 -8
View File
@@ -66,14 +66,16 @@ class StubModuleContext(_StubContextMixin, ModuleContext):
for f in filters:
yield f
def _iter_modules(self, path):
dirs = os.listdir(path)
for name in dirs:
if os.path.isdir(os.path.join(path, name)):
yield (None, name, True)
if name.endswith('.pyi'):
yield (None, name[:-4], True)
return []
def _iter_module_names(self, paths):
for path in paths:
dirs = os.listdir(path)
for name in dirs:
if os.path.isdir(os.path.join(path, name)):
if name != '__pycache__':
yield name
if name.endswith('.pyi'):
if name != '__init__.pyi':
yield name[:-4]
class StubClass(_StubContextMixin, ClassMixin, ContextWrapper):