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
+8 -7
View File
@@ -393,14 +393,15 @@ class Importer(object):
# Non-modules are not completable.
if context.api_type != 'module': # not a module
continue
names += context.sub_modules_dict().values()
# namespace packages
try:
path_method = context.py__path__
except AttributeError:
pass
else:
# For implicit namespace packages and module names.
names += self._get_module_names(path_method(), in_module=context)
#try:
# path_method = context.py__path__
#except AttributeError:
# pass
#else:
# # For implicit namespace packages and module names.
# names += self._get_module_names(path_method(), in_module=context)
if only_modules:
# In the case of an import like `from x.` we don't need to