Some changes because parso has changed.

This commit is contained in:
Dave Halter
2017-05-22 15:42:42 -04:00
parent 91e753e07a
commit b90589b62e
9 changed files with 21 additions and 26 deletions

View File

@@ -8,13 +8,14 @@ from jedi.evaluate.sys_path import (_get_parent_dir_with_file,
_check_module)
from jedi.evaluate import Evaluator
from jedi.evaluate.representation import ModuleContext
from parso.python import parse, load_grammar
from parso.python import parse
from parso import load_python_grammar
from ..helpers import cwd_at
def check_module_test(code):
grammar = load_grammar()
grammar = load_python_grammar()
module_context = ModuleContext(Evaluator(grammar), parse(code), path=None)
return _check_module(module_context)
@@ -66,7 +67,7 @@ def test_sys_path_with_modifications():
""")
path = os.path.abspath(os.path.join(os.curdir, 'module_name.py'))
grammar = load_grammar()
grammar = load_python_grammar()
module_node = parse(code, path=path)
module_context = ModuleContext(Evaluator(grammar), module_node, path=path)
paths = sys_path_with_modifications(module_context.evaluator, module_context)

View File

@@ -1,7 +1,7 @@
from textwrap import dedent
from jedi._compatibility import builtins, is_py3
from parso.python import load_grammar
from parso import load_python_grammar
from jedi.evaluate import compiled, instance
from jedi.evaluate.representation import FunctionContext
from jedi.evaluate import Evaluator
@@ -10,7 +10,7 @@ from jedi import Script
def _evaluator():
return Evaluator(load_grammar())
return Evaluator(load_python_grammar())
def test_simple():