From 333f8eca731bd8aced7762521e06da1923683e26 Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Wed, 4 Sep 2024 00:59:06 +0200 Subject: [PATCH 1/2] docs(configuration): clarify `uv.toml` precedence --- docs/configuration/files.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/configuration/files.md b/docs/configuration/files.md index 122f251d5a34..ce90ba855aa1 100644 --- a/docs/configuration/files.md +++ b/docs/configuration/files.md @@ -33,6 +33,12 @@ uv will also search for `uv.toml` files, which follow an identical structure, bu index-url = "https://test.pypi.org/simple" ``` +!!! note + + `uv.toml` files take precedence over `pyproject.toml` ones, so if both `uv.toml` and + `pyproject.toml` files are used in a directory, configuration will be read from `uv.toml`, and + `[tool.uv]` section in `pyproject.toml` will be ignored. + uv will also discover user-level configuration at `~/.config/uv/uv.toml` (or `$XDG_CONFIG_HOME/uv/uv.toml`) on macOS and Linux, or `%APPDATA%\uv\uv.toml` on Windows. User-level configuration must use the `uv.toml` format, rather than the `pyproject.toml` format, as a From 5292b9b3521b24ed087e4b00bb844a17d02d8196 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 4 Sep 2024 11:56:28 -0400 Subject: [PATCH 2/2] Tweaks --- docs/configuration/files.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration/files.md b/docs/configuration/files.md index ce90ba855aa1..58c6dc99550a 100644 --- a/docs/configuration/files.md +++ b/docs/configuration/files.md @@ -35,9 +35,9 @@ index-url = "https://test.pypi.org/simple" !!! note - `uv.toml` files take precedence over `pyproject.toml` ones, so if both `uv.toml` and - `pyproject.toml` files are used in a directory, configuration will be read from `uv.toml`, and - `[tool.uv]` section in `pyproject.toml` will be ignored. + `uv.toml` files take precedence over `pyproject.toml` files, so if both `uv.toml` and + `pyproject.toml` files are present in a directory, configuration will be read from `uv.toml`, and + `[tool.uv]` section in the accompanying `pyproject.toml` will be ignored. uv will also discover user-level configuration at `~/.config/uv/uv.toml` (or `$XDG_CONFIG_HOME/uv/uv.toml`) on macOS and Linux, or `%APPDATA%\uv\uv.toml` on Windows. User-level