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
+2 -8
View File
@@ -87,7 +87,7 @@ from jedi.evaluate.syntax_tree import eval_trailer, eval_expr_stmt, \
class Evaluator(object):
def __init__(self, grammar, sys_path=None):
def __init__(self, grammar, project):
self.grammar = grammar
self.latest_grammar = parso.load_grammar(version='3.6')
self.memoize_cache = {} # for memoize decorators
@@ -101,13 +101,7 @@ class Evaluator(object):
self.is_analysis = False
self.python_version = sys.version_info[:2]
if sys_path is None:
sys_path = sys.path
self.sys_path = copy.copy(sys_path)
try:
self.sys_path.remove('')
except ValueError:
pass
self.project = project
self.reset_recursion_limitations()