1
0
forked from VimPlug/jedi

Implement all remaining Path issues and use it instead of strings

This commit is contained in:
Dave Halter
2020-07-12 01:14:00 +02:00
parent db0e90763b
commit 480a464179
23 changed files with 131 additions and 97 deletions

View File

@@ -142,7 +142,7 @@ class Script(object):
if project is None:
# Load the Python grammar of the current interpreter.
project = get_default_project(self.path)
project = get_default_project(None if self.path is None else self.path.parent)
# TODO deprecate and remove sys_path from the Script API.
if sys_path is not None:
project._sys_path = sys_path
@@ -192,7 +192,7 @@ class Script(object):
file_io = None
else:
file_io = KnownContentFileIO(cast_path(self.path), self._code)
if self.path is not None and self.path.suffix == 'pyi':
if self.path is not None and self.path.suffix == '.pyi':
# We are in a stub file. Try to load the stub properly.
stub_module = load_proper_stub_module(
self._inference_state,