forked from VimPlug/jedi
fixed more import problems (also with the import usage), definitely fixes davidhalter/jedi-vim#152
This commit is contained in:
+6
-4
@@ -153,14 +153,16 @@ class ImportPath(pr.Base):
|
||||
return pr.Name(self.GlobalNamespace, [(name, inf_pos)],
|
||||
inf_pos, inf_pos, self.import_stmt)
|
||||
|
||||
if not search_path:
|
||||
search_path = self.sys_path_with_modifications()
|
||||
names = []
|
||||
inf_pos = float('inf'), float('inf')
|
||||
# add builtin module names
|
||||
if search_path is None:
|
||||
names += [generate_name(name) for name in sys.builtin_module_names]
|
||||
|
||||
if search_path is None:
|
||||
search_path = self.sys_path_with_modifications()
|
||||
for module_loader, name, is_pkg in pkgutil.iter_modules(search_path):
|
||||
names.append(generate_name(name))
|
||||
# add builtin module names
|
||||
names += [generate_name(name) for name in sys.builtin_module_names]
|
||||
return names
|
||||
|
||||
def sys_path_with_modifications(self):
|
||||
|
||||
Reference in New Issue
Block a user