mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-27 08:12:18 +08:00
Some more parso adaptations.
This commit is contained in:
@@ -124,7 +124,9 @@ class Script(object):
|
|||||||
|
|
||||||
cache.clear_time_caches()
|
cache.clear_time_caches()
|
||||||
debug.reset_time()
|
debug.reset_time()
|
||||||
self._grammar = parso.load_grammar(version='%s.%s' % sys.version_info[:2])
|
|
||||||
|
# Load the Python grammar of the current interpreter.
|
||||||
|
self._grammar = parso.load_grammar()
|
||||||
if sys_path is None:
|
if sys_path is None:
|
||||||
venv = os.getenv('VIRTUAL_ENV')
|
venv = os.getenv('VIRTUAL_ENV')
|
||||||
if venv:
|
if venv:
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ from jedi import parser_utils
|
|||||||
class Evaluator(object):
|
class Evaluator(object):
|
||||||
def __init__(self, grammar, sys_path=None):
|
def __init__(self, grammar, sys_path=None):
|
||||||
self.grammar = grammar
|
self.grammar = grammar
|
||||||
self.latest_grammar = parso.load_grammar('3.6')
|
self.latest_grammar = parso.load_grammar(version='3.6')
|
||||||
self.memoize_cache = {} # for memoize decorators
|
self.memoize_cache = {} # for memoize decorators
|
||||||
# To memorize modules -> equals `sys.modules`.
|
# To memorize modules -> equals `sys.modules`.
|
||||||
self.modules = {} # like `sys.modules`.
|
self.modules = {} # like `sys.modules`.
|
||||||
|
|||||||
Reference in New Issue
Block a user