Use sys path mostly from project and move some sys path stuff around.

This commit is contained in:
Dave Halter
2017-10-05 10:06:28 +02:00
parent 383f749026
commit 51d2ffb078
7 changed files with 77 additions and 67 deletions

View File

@@ -111,7 +111,9 @@ class Script(object):
# Load the Python grammar of the current interpreter.
self._grammar = parso.load_grammar()
self._evaluator = Evaluator(self._grammar, Project(sys_path=sys_path))
project = Project(sys_path=sys_path)
self._evaluator = Evaluator(self._grammar, project)
project.add_script_path(self.path)
debug.speed('init')
@cache.memoize_method