diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 1743451f..41c1f23c 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -116,7 +116,7 @@ class Script(object): code=source, path=self.path, cache=False, # No disk cache, because the current script often changes. - diff_cache=True, + diff_cache=settings.fast_parser, cache_path=settings.cache_directory ) debug.speed('parsed') diff --git a/jedi/evaluate/compiled/mixed.py b/jedi/evaluate/compiled/mixed.py index 773b5292..f2cb2152 100644 --- a/jedi/evaluate/compiled/mixed.py +++ b/jedi/evaluate/compiled/mixed.py @@ -107,7 +107,7 @@ def _load_module(evaluator, path): module_node = evaluator.grammar.parse( path=path, cache=True, - diff_cache=True, + diff_cache=settings.fast_parser, cache_path=settings.cache_directory ).get_root_node() # python_module = inspect.getmodule(python_object) diff --git a/jedi/evaluate/imports.py b/jedi/evaluate/imports.py index 17b450ad..df2f0fcc 100644 --- a/jedi/evaluate/imports.py +++ b/jedi/evaluate/imports.py @@ -500,7 +500,8 @@ def _load_module(evaluator, path=None, code=None, sys_path=None, if path is not None and path.endswith(('.py', '.zip', '.egg')): module_node = evaluator.parse( - code=code, path=path, cache=True, diff_cache=True, + code=code, path=path, cache=True, + diff_cache=settings.fast_parser, cache_path=settings.cache_directory) from jedi.evaluate.context import ModuleContext