mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-18 02:44:19 +08:00
Evaluator -> InferState
This commit is contained in:
@@ -11,7 +11,7 @@ from collections import namedtuple
|
||||
from jedi._compatibility import highest_pickle_protocol, which
|
||||
from jedi.cache import memoize_method, time_cache
|
||||
from jedi.inference.compiled.subprocess import CompiledSubprocess, \
|
||||
EvaluatorSameProcess, EvaluatorSubprocess
|
||||
InferStateSameProcess, InferStateSubprocess
|
||||
|
||||
import parso
|
||||
|
||||
@@ -109,8 +109,8 @@ class Environment(_BaseEnvironment):
|
||||
version = '.'.join(str(i) for i in self.version_info)
|
||||
return '<%s: %s in %s>' % (self.__class__.__name__, version, self.path)
|
||||
|
||||
def get_evaluator_subprocess(self, evaluator):
|
||||
return EvaluatorSubprocess(evaluator, self._get_subprocess())
|
||||
def get_infer_state_subprocess(self, infer_state):
|
||||
return InferStateSubprocess(infer_state, self._get_subprocess())
|
||||
|
||||
@memoize_method
|
||||
def get_sys_path(self):
|
||||
@@ -140,8 +140,8 @@ class SameEnvironment(_SameEnvironmentMixin, Environment):
|
||||
|
||||
|
||||
class InterpreterEnvironment(_SameEnvironmentMixin, _BaseEnvironment):
|
||||
def get_evaluator_subprocess(self, evaluator):
|
||||
return EvaluatorSameProcess(evaluator)
|
||||
def get_infer_state_subprocess(self, infer_state):
|
||||
return InferStateSameProcess(infer_state)
|
||||
|
||||
def get_sys_path(self):
|
||||
return sys.path
|
||||
|
||||
Reference in New Issue
Block a user