1
0
forked from VimPlug/jedi

Add a latest grammar to the evaluator and use it to avoid importing from parso import parse.

This commit is contained in:
Dave Halter
2017-05-24 00:37:36 -04:00
parent b90589b62e
commit cd8932fbfc
10 changed files with 31 additions and 26 deletions

View File

@@ -64,6 +64,8 @@ import copy
import sys
from parso.python import tree
from parso import load_python_grammar
from jedi import debug
from jedi.common import unite
from jedi.evaluate import representation as er
@@ -87,6 +89,7 @@ from jedi import parser_utils
class Evaluator(object):
def __init__(self, grammar, sys_path=None):
self.grammar = grammar
self.latest_grammar = load_python_grammar('3.6')
self.memoize_cache = {} # for memoize decorators
# To memorize modules -> equals `sys.modules`.
self.modules = {} # like `sys.modules`.