forked from VimPlug/jedi
Merge pull request #2051 from allrob23/perf-list-to-set
perf: optimize transitions and path handling using sets
This commit is contained in:
@@ -480,7 +480,7 @@ def _load_builtin_module(inference_state, import_names=None, sys_path=None):
|
|||||||
if sys_path is None:
|
if sys_path is None:
|
||||||
sys_path = inference_state.get_sys_path()
|
sys_path = inference_state.get_sys_path()
|
||||||
if not project._load_unsafe_extensions:
|
if not project._load_unsafe_extensions:
|
||||||
safe_paths = project._get_base_sys_path(inference_state)
|
safe_paths = set(project._get_base_sys_path(inference_state))
|
||||||
sys_path = [p for p in sys_path if p in safe_paths]
|
sys_path = [p for p in sys_path if p in safe_paths]
|
||||||
|
|
||||||
dotted_name = '.'.join(import_names)
|
dotted_name = '.'.join(import_names)
|
||||||
|
|||||||
Reference in New Issue
Block a user