Skip to content

Commit a41ef21

Browse files
authored
Fix suggestion to use uv help python on invalid install requests (#9820)
Closes #9819
1 parent ae25c2f commit a41ef21

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

crates/uv-cli/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2306,7 +2306,7 @@ pub struct VenvArgs {
23062306
/// During virtual environment creation, uv will not look for Python
23072307
/// interpreters in virtual environments.
23082308
///
2309-
/// See `uv python help` for details on Python discovery and supported
2309+
/// See `uv help python` for details on Python discovery and supported
23102310
/// request formats.
23112311
#[arg(
23122312
long,

crates/uv/src/commands/python/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl InstallRequest {
4848
let download_request = PythonDownloadRequest::from_request(&request)
4949
.ok_or_else(|| {
5050
anyhow::anyhow!(
51-
"`{}` is not a valid Python download request; see `uv python help` for supported formats and `uv python list --only-downloads` for available versions",
51+
"`{}` is not a valid Python download request; see `uv help python` for supported formats and `uv python list --only-downloads` for available versions",
5252
request.to_canonical_string()
5353
)
5454
})?

crates/uv/tests/it/python_install.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ fn python_install_invalid_request() {
491491
----- stdout -----
492492
493493
----- stderr -----
494-
error: `foobar` is not a valid Python download request; see `uv python help` for supported formats and `uv python list --only-downloads` for available versions
494+
error: `foobar` is not a valid Python download request; see `uv help python` for supported formats and `uv python list --only-downloads` for available versions
495495
"###);
496496

497497
// Request a version we don't have a download for
@@ -824,7 +824,7 @@ fn python_install_unknown() {
824824
----- stdout -----
825825
826826
----- stderr -----
827-
error: `foobar` is not a valid Python download request; see `uv python help` for supported formats and `uv python list --only-downloads` for available versions
827+
error: `foobar` is not a valid Python download request; see `uv help python` for supported formats and `uv python list --only-downloads` for available versions
828828
"###);
829829

830830
context.temp_dir.child("foo").create_dir_all().unwrap();
@@ -836,7 +836,7 @@ fn python_install_unknown() {
836836
----- stdout -----
837837
838838
----- stderr -----
839-
error: `./foo` is not a valid Python download request; see `uv python help` for supported formats and `uv python list --only-downloads` for available versions
839+
error: `./foo` is not a valid Python download request; see `uv help python` for supported formats and `uv python list --only-downloads` for available versions
840840
"###);
841841
}
842842

docs/reference/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7726,7 +7726,7 @@ uv venv [OPTIONS] [PATH]
77267726

77277727
<p>During virtual environment creation, uv will not look for Python interpreters in virtual environments.</p>
77287728

7729-
<p>See <code>uv python help</code> for details on Python discovery and supported request formats.</p>
7729+
<p>See <a href="#uv-python">uv python</a> for details on Python discovery and supported request formats.</p>
77307730

77317731
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p>
77327732
</dd><dt><code>--python-preference</code> <i>python-preference</i></dt><dd><p>Whether to prefer uv-managed or system Python installations.</p>

0 commit comments

Comments
 (0)