astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
21.66k stars 632 forks source link

[docs] `uv help tool upgrade` mentions `--refresh` and `--refresh-package` options that do not exist for it #7775

Open ilyagr opened 2 days ago

ilyagr commented 2 days ago

I am using uv 0.4.17 (d2e7b40ce 2024-09-27).

The docs for uv tool upgrade are a bit confusing. The description of the -U option mentions the --refresh option that does not exist for this command. The description of -P option mentions a similarly nonexistent --refresh-package.

Moreover, -U is turned on by default, which is unclear from the help (but there's a message explaining it when you try to use uv tool upgrade -U).


The reason I got caught up in this, by the way, is that I wanted an option that does not update the tool's dependencies unless the tool can be updated as well. See #7776 .

zanieb commented 2 days ago

Thanks!

These options come from a shared struct which contains all options for commands that resolve and install. We should probably override and omit them though, as I don't think --upgrade and --upgrade-package don't make sense here?