mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-28 09:02:18 +08:00
also enable autocompletion on namespace packages, fixes #122
This commit is contained in:
@@ -129,7 +129,8 @@ class ImportPath(pr.Base):
|
||||
if on_import_stmt and isinstance(scope, pr.Module) \
|
||||
and scope.path.endswith('__init__.py'):
|
||||
pkg_path = os.path.dirname(scope.path)
|
||||
names += self.get_module_names([pkg_path])
|
||||
paths = self._namespace_packages(pkg_path, self.import_path)
|
||||
names += self.get_module_names([pkg_path] + paths)
|
||||
for s, scope_names in evaluate.get_names_of_scope(scope,
|
||||
include_builtin=False):
|
||||
for n in scope_names:
|
||||
|
||||
Reference in New Issue
Block a user