Skip to content

Commit

Permalink
docs(tools): mention how to use extras (#8972)
Browse files Browse the repository at this point in the history
## Summary

Figured this could be helpful to mention in the documentation, as it
might not be obvious that this is possible.

## Test Plan

Tested the commands locally.
  • Loading branch information
mkniewallner authored Nov 11, 2024
1 parent 9368268 commit 85a7d45
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/guides/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ $ uvx --from 'ruff>0.2.0,<0.3.0' ruff check

Note the `@` syntax cannot be used for anything other than an exact version.

## Requesting extras

The `--from` option can be used to run a tool with extras:

```console
$ uvx --from 'mypy[faster-cache,reports]' mypy --xml-report mypy_report
```

This can also be combined with version selection:

```console
$ uvx --from 'mypy[faster-cache,reports]==1.13.0' mypy --xml-report mypy_report
```

## Requesting different sources

The `--from` option can also be used to install from alternative sources.
Expand Down

0 comments on commit 85a7d45

Please sign in to comment.