1
0
forked from VimPlug/jedi

Move the initial sys path generation into a new project class.

This commit is contained in:
Dave Halter
2017-10-02 20:19:47 +02:00
parent 0762c9218c
commit 383f749026
10 changed files with 42 additions and 26 deletions

View File

@@ -161,7 +161,7 @@ def _check_module(module_context):
if n.type == 'name' and n.value == 'path':
yield name, power
sys_path = list(module_context.evaluator.sys_path) # copy
sys_path = list(module_context.evaluator.project.sys_path) # copy
if isinstance(module_context, CompiledObject):
return sys_path
@@ -189,7 +189,7 @@ def sys_path_with_modifications(evaluator, module_context):
if path is None:
# Support for modules without a path is bad, therefore return the
# normal path.
return list(evaluator.sys_path)
return evaluator.project.sys_path
curdir = os.path.abspath(os.curdir)
#TODO why do we need a chdir?