mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Better search for venvs
This commit is contained in:
@@ -352,9 +352,8 @@ class Project:
|
|||||||
# 3. Search for modules on sys.path
|
# 3. Search for modules on sys.path
|
||||||
sys_path = [
|
sys_path = [
|
||||||
p for p in self._get_sys_path(inference_state)
|
p for p in self._get_sys_path(inference_state)
|
||||||
# Exclude folders that are handled by recursing of the Python
|
# Exclude the current folder which is handled by recursing the folders.
|
||||||
# folders.
|
if p != self._path
|
||||||
if not p.startswith(str(self._path))
|
|
||||||
]
|
]
|
||||||
names = list(iter_module_names(inference_state, empty_module_context, sys_path))
|
names = list(iter_module_names(inference_state, empty_module_context, sys_path))
|
||||||
yield from search_in_module(
|
yield from search_in_module(
|
||||||
|
|||||||
Reference in New Issue
Block a user