Ignore local configuration in tool commands (#5923)

## Summary

If you're running a user-level command, we shouldn't respect the local
`pyproject.toml` or `uv.toml`.
This commit is contained in:
Charlie Marsh 2024-08-08 14:25:12 -04:00 committed by GitHub
parent f4576fe4a7
commit dd1bcf8ab9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 138 additions and 23 deletions

View file

@ -5,6 +5,12 @@ uv supports persistent configuration files at both the project- and user-level.
Specifically, uv will search for a `pyproject.toml` or `uv.toml` file in the current directory, or
in the nearest parent directory.
!!! note
For `tool` commands, which operate the user level, local configuration
files will be ignored. Instead, uv will exclusively read from user-level configuration
(e.g., `~/.config/uv/uv.toml`).
If a `pyproject.toml` file is found, uv will read configuration from the `[tool.uv.pip]` table. For
example, to set a persistent index URL, add the following to a `pyproject.toml`: