mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
[ty] Resolving Python path using CONDA_PREFIX
variable to support Conda and Pixi (#18267)
This commit is contained in:
parent
a1399656c9
commit
53d19f8368
4 changed files with 89 additions and 1 deletions
|
@ -186,6 +186,11 @@ impl Options {
|
|||
.ok()
|
||||
.map(PythonPath::from_virtual_env_var)
|
||||
})
|
||||
.or_else(|| {
|
||||
std::env::var("CONDA_PREFIX")
|
||||
.ok()
|
||||
.map(PythonPath::from_conda_prefix_var)
|
||||
})
|
||||
.unwrap_or_else(|| PythonPath::Discover(project_root.to_path_buf())),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue