-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
astral-sh/ruff
#19990Labels
importsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics
Milestone
Description
Summary
In some cases, one can have a .venv without activating it (e.g. a .venv created by bazel), but it will currently not be found with a standard setup, where conda is installed.
This is because even without activating a conda environment, you will still usually have ~ CONDA_DEFAULT_ENV=baseCONDA_PREFIX=/opt/anaconda3, so ty will use site-packages from your base conda environment and not look in the .venv.
I think ty should generally prefer the .venv over the base conda environment here. It is less clear if you would prefer the .venv if any non-standard environment is activated, but at least for the base environment I think that the current behavior is unexpected.
Version
ty 0.0.1-alpha.8 (c1337c9 2025-06-02)
Metadata
Metadata
Assignees
Labels
importsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics