docs: add docs to uv python pin without a REQUEST argument (#9631)
Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
@@ -4159,8 +4159,12 @@ pub enum PythonCommand {
|
||||
|
||||
/// Pin to a specific Python version.
|
||||
///
|
||||
/// Writes the pinned version to a `.python-version` file, which is then
|
||||
/// read by other uv commands when determining the required Python version.
|
||||
/// Writes the pinned Python version to a `.python-version` file, which is used by other uv
|
||||
/// commands to determine the required Python version.
|
||||
///
|
||||
/// If no version is provided, uv will look for an existing `.python-version` file and display
|
||||
/// the currently pinned version. If no `.python-version` file is found, uv will exit with an
|
||||
/// error.
|
||||
///
|
||||
/// See `uv help python` to view supported request formats.
|
||||
Pin(PythonPinArgs),
|
||||
@@ -4339,6 +4343,8 @@ pub struct PythonPinArgs {
|
||||
/// files, i.e., `pyenv`. If compatibility with those tools is needed, only
|
||||
/// use version numbers instead of complex requests such as `cpython@3.10`.
|
||||
///
|
||||
/// If no request is provided, the currently pinned version will be shown.
|
||||
///
|
||||
/// See `uv help python` to view supported request formats.
|
||||
pub request: Option<String>,
|
||||
|
||||
|
||||
@@ -4771,7 +4771,9 @@ uv python find [OPTIONS] [REQUEST]
|
||||
|
||||
Pin to a specific Python version.
|
||||
|
||||
Writes the pinned version to a `.python-version` file, which is then read by other uv commands when determining the required Python version.
|
||||
Writes the pinned Python version to a `.python-version` file, which is used by other uv commands to determine the required Python version.
|
||||
|
||||
If no version is provided, uv will look for an existing `.python-version` file and display the currently pinned version. If no `.python-version` file is found, uv will exit with an error.
|
||||
|
||||
See `uv help python` to view supported request formats.
|
||||
|
||||
@@ -4787,6 +4789,8 @@ uv python pin [OPTIONS] [REQUEST]
|
||||
|
||||
<p>uv supports more formats than other tools that read <code>.python-version</code> files, i.e., <code>pyenv</code>. If compatibility with those tools is needed, only use version numbers instead of complex requests such as <code>cpython@3.10</code>.</p>
|
||||
|
||||
<p>If no request is provided, the currently pinned version will be shown.</p>
|
||||
|
||||
<p>See <a href="#uv-python">uv python</a> to view supported request formats.</p>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
Reference in New Issue
Block a user