From 19c3556909612f515e3f933d4498dd1d1e63babe Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Fri, 16 Aug 2024 11:44:29 -0600 Subject: [PATCH] fix: add tool path so isort works without bundled version (#417) fixes #316 --- bundled/tool/lsp_server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bundled/tool/lsp_server.py b/bundled/tool/lsp_server.py index 74bc9fb..5aa0d49 100644 --- a/bundled/tool/lsp_server.py +++ b/bundled/tool/lsp_server.py @@ -31,6 +31,9 @@ def update_sys_path(path_to_add: str, strategy: str) -> None: os.getenv("LS_IMPORT_STRATEGY", "useBundled"), ) +# https://github.com/microsoft/vscode-isort/issues/316#issuecomment-2103588949 +update_sys_path(os.fspath(pathlib.Path(__file__).parent.parent / "tool"), "useBundled") + # ********************************************************** # Imports needed for the language server goes below this. # **********************************************************