Skip to content

Commit

Permalink
fix: Conda venv is not used
Browse files Browse the repository at this point in the history
Conda doesn't follow PEP 405.

Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Aug 11, 2024
1 parent c32d464 commit 871d379
Show file tree
Hide file tree
Showing 2 changed files with 210 additions and 149 deletions.
11 changes: 8 additions & 3 deletions plugin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@
from .constants import PACKAGE_NAME
from .log import log_info, log_warning
from .template import load_string_template
from .venv_finder import VenvInfo, find_venv_by_finder_names, get_finder_name_mapping
from .venv_finder import (
BaseVenvInfo,
find_venv_by_finder_names,
find_venv_by_python_executable,
get_finder_name_mapping,
)


@dataclass
class WindowAttr:
simple_python_executable: Path | None = None
"""The path to the Python executable found by the `PATH` env variable."""
venv_info: VenvInfo | None = None
venv_info: BaseVenvInfo | None = None
"""The information of the virtual environment."""

@property
Expand Down Expand Up @@ -272,7 +277,7 @@ def _update_venv_info() -> None:
window_attr.venv_info = None

if python_path := settings.get("python.pythonPath"):
window_attr.venv_info = VenvInfo.from_python_executable(python_path)
window_attr.venv_info = find_venv_by_python_executable(python_path)
return

supported_finder_names = tuple(get_finder_name_mapping().keys())
Expand Down
Loading

0 comments on commit 871d379

Please sign in to comment.