mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-08 01:10:56 +08:00
Some changes because parso has changed.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user