예제 #1
0
    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
예제 #2
0
파일: conftest.py 프로젝트: yangle/jedi
def same_process_inference_state(Script):
    return Script('', environment=InterpreterEnvironment())._inference_state