mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
Fix an issue with environment selection
This commit is contained in:
@@ -91,7 +91,7 @@ class Project(object):
|
|||||||
@inference_state_as_method_param_cache()
|
@inference_state_as_method_param_cache()
|
||||||
def _get_base_sys_path(self, inference_state):
|
def _get_base_sys_path(self, inference_state):
|
||||||
# The sys path has not been set explicitly.
|
# 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:
|
try:
|
||||||
sys_path.remove('')
|
sys_path.remove('')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@@ -99,8 +99,7 @@ class Project(object):
|
|||||||
return sys_path
|
return sys_path
|
||||||
|
|
||||||
@inference_state_as_method_param_cache()
|
@inference_state_as_method_param_cache()
|
||||||
def _get_sys_path(self, inference_state, environment=None,
|
def _get_sys_path(self, inference_state, add_parent_paths=True, add_init_paths=False):
|
||||||
add_parent_paths=True, add_init_paths=False):
|
|
||||||
"""
|
"""
|
||||||
Keep this method private for all users of jedi. However internally this
|
Keep this method private for all users of jedi. However internally this
|
||||||
one is used like a public method.
|
one is used like a public method.
|
||||||
|
|||||||
Reference in New Issue
Block a user