From 841fe75326a75c203300ae549af600d73e3ce940 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 6 Feb 2020 22:41:11 +0100 Subject: [PATCH] Fix an issue with environment selection --- jedi/api/project.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jedi/api/project.py b/jedi/api/project.py index 9b418e2a..45e4c09a 100644 --- a/jedi/api/project.py +++ b/jedi/api/project.py @@ -91,7 +91,7 @@ class Project(object): @inference_state_as_method_param_cache() def _get_base_sys_path(self, inference_state): # The sys path has not been set explicitly. - sys_path = list(self.get_environment().get_sys_path()) + sys_path = list(inference_state.environment.get_sys_path()) try: sys_path.remove('') except ValueError: @@ -99,8 +99,7 @@ class Project(object): return sys_path @inference_state_as_method_param_cache() - def _get_sys_path(self, inference_state, environment=None, - add_parent_paths=True, add_init_paths=False): + def _get_sys_path(self, inference_state, add_parent_paths=True, add_init_paths=False): """ Keep this method private for all users of jedi. However internally this one is used like a public method.