1
0
forked from VimPlug/jedi

Start using file io when opening random modules

This commit is contained in:
Dave Halter
2019-05-31 23:25:41 +02:00
parent b9e8bff5e2
commit fcf214b548
5 changed files with 59 additions and 42 deletions

View File

@@ -164,7 +164,10 @@ class Script(object):
names = import_names
is_package = is_p
file_io = KnownContentFileIO(cast_path(self.path), self._code)
if self.path is None:
file_io = None
else:
file_io = KnownContentFileIO(cast_path(self.path), self._code)
if self.path is not None and self.path.endswith('.pyi'):
# We are in a stub file. Try to load the stub properly.
stub_module = load_proper_stub_module(