Ignore `.python-version` files in `uv venv` with `--no-config` (#6513)

Dupe of  #6373 — merged into the wrong branch by accident.
This commit is contained in:
Zanie Blue 2024-08-23 08:56:11 -05:00 committed by GitHub
parent 7edd78c797
commit 01fc233dd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -57,6 +57,7 @@ pub(crate) async fn venv(
exclude_newer: Option<ExcludeNewer>,
concurrency: Concurrency,
native_tls: bool,
no_config: bool,
cache: &Cache,
printer: Printer,
relocatable: bool,
@ -78,6 +79,7 @@ pub(crate) async fn venv(
exclude_newer,
concurrency,
native_tls,
no_config,
cache,
printer,
relocatable,
@ -130,6 +132,7 @@ async fn venv_impl(
exclude_newer: Option<ExcludeNewer>,
concurrency: Concurrency,
native_tls: bool,
no_config: bool,
cache: &Cache,
printer: Printer,
relocatable: bool,
@ -145,8 +148,7 @@ async fn venv_impl(
// (2) Request from `.python-version`
if interpreter_request.is_none() {
// TODO(zanieb): Support `--no-config` here
interpreter_request = PythonVersionFile::discover(&*CWD, false, false)
interpreter_request = PythonVersionFile::discover(&*CWD, no_config, false)
.await
.into_diagnostic()?
.and_then(PythonVersionFile::into_version);

View File

@ -681,6 +681,7 @@ async fn run(cli: Cli) -> Result<ExitStatus> {
args.settings.exclude_newer,
globals.concurrency,
globals.native_tls,
cli.no_config,
&cache,
printer,
args.relocatable,