1
0
forked from VimPlug/jedi

change the return of _Importer.follow_file_system

This commit is contained in:
Dave Halter
2015-04-23 02:39:44 +02:00
parent d04241b482
commit f4f30841ec

View File

@@ -97,7 +97,7 @@ class ImportWrapper(pr.Base):
importer = get_importer(self._evaluator, tuple(import_path), importer = get_importer(self._evaluator, tuple(import_path),
module, self._import.level) module, self._import.level)
types, rest = importer.follow_file_system() types = importer.follow_file_system()
#if self._import.is_nested() and not self.nested_resolve: #if self._import.is_nested() and not self.nested_resolve:
# scopes = [NestedImportModule(module, self._import)] # scopes = [NestedImportModule(module, self._import)]
@@ -110,7 +110,7 @@ class ImportWrapper(pr.Base):
importer = get_importer(self._evaluator, importer = get_importer(self._evaluator,
tuple(import_path + [from_import_name]), tuple(import_path + [from_import_name]),
module, self._import.level) module, self._import.level)
types, _ = importer.follow_file_system() types = importer.follow_file_system()
# goto only accepts `Name` # goto only accepts `Name`
if is_goto: if is_goto:
types = [s.name for s in types] types = [s.name for s in types]
@@ -293,7 +293,7 @@ class _Importer(object):
def follow(self, evaluator): def follow(self, evaluator):
try: try:
scopes, _ = self.follow_file_system() scopes = self.follow_file_system()
except ModuleNotFound: except ModuleNotFound:
return [] return []
return scopes return scopes
@@ -301,9 +301,9 @@ class _Importer(object):
@memoize_default(NO_DEFAULT) @memoize_default(NO_DEFAULT)
def follow_file_system(self): def follow_file_system(self):
if not self.import_path: if not self.import_path:
return [], [] return []
modules = self._do_import(self.import_path, self.sys_path_with_modifications()) modules = self._do_import(self.import_path, self.sys_path_with_modifications())
return modules, [] return modules
# TODO delete - move! # TODO delete - move!