def _get_inference_state(self, function, inference_state_id): from jedi.inference import InferenceState try: inference_state = self._inference_states[inference_state_id] except KeyError: from jedi import InterpreterEnvironment inference_state = InferenceState( # The project is not actually needed. Nothing should need to # access it. project=None, environment=InterpreterEnvironment()) self._inference_states[inference_state_id] = inference_state return inference_state
def same_process_inference_state(Script): return Script('', environment=InterpreterEnvironment())._inference_state