docs: made uvx note more explict (#6546)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary I used `uvx` to test my code using `pytest` it was just before the documentation and it worked pretty fine. But when I saw the docs I was confused as it says: > If you are running a tool in a project and the tool requires that your project is installed, e.g., when using `pytest` or `mypy`, you'll want to use `uv` run instead of `uvx`. Otherwise, the tool will be run in a virtual environment that is isolated from your project. So to make it simple if you don't recommend using `uvx` in this situation then here is the pull request, and if not just close this pull request. I said that I don't have to open an issue to discuss this as it's so simple. ## Test Plan None --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
@@ -43,9 +43,15 @@ Tools are installed into temporary, isolated environments when using `uvx`.
|
||||
|
||||
!!! note
|
||||
|
||||
If you are running a tool in a [_project_](../concepts/projects.md) and the tool requires that your project is installed,
|
||||
e.g., when using `pytest` or `mypy`, you'll want to use [`uv run`](./projects.md#running-commands) instead of `uvx`.
|
||||
Otherwise, the tool will be run in a virtual environment that is isolated from your project.
|
||||
If you are running a tool in a [_project_](../concepts/projects.md) and the tool requires that
|
||||
your project is installed, e.g., when using `pytest` or `mypy`, you'll want to use
|
||||
[`uv run`](./projects.md#running-commands) instead of `uvx`. Otherwise, the tool will be run in
|
||||
a virtual environment that is isolated from your project.
|
||||
|
||||
If your project has a flat structure, e.g., instead of using a `src` directory for modules,
|
||||
the project itself does not need to be installed and `uvx` is fine. In this case, using
|
||||
`uv run` is only beneficial if you want to pin the version of the tool in the project's
|
||||
dependencies.
|
||||
|
||||
## Commands with different package names
|
||||
|
||||
|
||||
Reference in New Issue
Block a user