From 273a22c3c97ef7eb87c15e9e95a061b5d084c8e6 Mon Sep 17 00:00:00 2001 From: Jack Cherng Date: Mon, 6 May 2024 22:41:27 +0800 Subject: [PATCH] fix: import is not found under some circumstances Signed-off-by: Jack Cherng --- plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.py b/plugin.py index 4e1f503..fb1c8d1 100644 --- a/plugin.py +++ b/plugin.py @@ -185,7 +185,7 @@ def python_path(cls, settings: DottedDict, workspace_folders: list[WorkspaceFold return python_path if workspace_folders: - workspace_folder = Path(workspace_folders[0].path) + workspace_folder = Path(workspace_folders[0].path).resolve() for folder in (workspace_folder, *workspace_folder.parents): if python_path := cls.python_path_from_venv(folder): return str(python_path)