Respect .python-version files and pyproject.toml in uv python find (#6369)

I was surprised to find we didn't do this — we should find Python
versions as we do everywhere else.
This commit is contained in:
Zanie Blue
2024-08-21 17:08:29 -05:00
committed by GitHub
parent 9a14e028df
commit 7140cdec79
7 changed files with 182 additions and 14 deletions
+7
View File
@@ -3029,6 +3029,13 @@ pub struct PythonFindArgs {
///
/// See `uv help python` to view supported request formats.
pub request: Option<String>,
/// Avoid discovering a project or workspace.
///
/// Otherwise, when no request is provided, the Python requirement of a project in the current
/// directory or parent directories will be used.
#[arg(long, alias = "no_workspace")]
pub no_project: bool,
}
#[derive(Args)]