Skip to content

Commit bb5ab6d

Browse files
committed
Put the relevant documents into the Requesting Python versions section.
Signed-off-by: FishAlchemist <[email protected]> Signed-off-by: FishAlchemist <[email protected]>
1 parent 0157ad8 commit bb5ab6d

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

docs/guides/tools.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,6 @@ To install `ruff`:
166166
$ uv tool install ruff
167167
```
168168

169-
You can specify the Python interpreter to use with the `--python` option:
170-
171-
```console
172-
$ uv tool install ruff --python=3.10
173-
```
174-
175169
When a tool is installed, its executables are placed in a `bin` directory in the `PATH` which allows
176170
the tool to be run without uv. If it's not on the `PATH`, a warning will be displayed and
177171
`uv tool update-shell` can be used to add it to the `PATH`.
@@ -227,12 +221,6 @@ To upgrade a tool, use `uv tool upgrade`:
227221
$ uv tool upgrade ruff
228222
```
229223

230-
You can specify the Python interpreter to use with the `--python` option:
231-
232-
```console
233-
$ uv tool upgrade ruff --python=3.10
234-
```
235-
236224
Tool upgrades will respect the version constraints provided when installing the tool. For example,
237225
`uv tool install ruff >=0.3,<0.4` followed by `uv tool upgrade ruff` will upgrade Ruff to the latest
238226
version in the range `>=0.3,<0.4`.
@@ -249,6 +237,23 @@ To instead upgrade all tools:
249237
$ uv tool upgrade --all
250238
```
251239

240+
## Requesting Python versions
241+
242+
You can specify the Python interpreter to use with the `--python` option when installing or
243+
upgrading tools.
244+
245+
To install `ruff` with a specific Python version:
246+
247+
```console
248+
$ uv tool install ruff --python=3.10
249+
```
250+
251+
To upgrade `ruff` with a specific Python version:
252+
253+
```console
254+
$ uv tool upgrade ruff --python=3.10
255+
```
256+
252257
## Next steps
253258

254259
To learn more about managing tools with uv, see the [Tools concept](../concepts/tools.md) page and

0 commit comments

Comments
 (0)