From 95e7d8702fbc11c401ffd07da13fbdcc031d6a2e Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 12 Nov 2024 14:43:54 -0500 Subject: [PATCH] Use `[[index]]` API in configuration example (#9065) ## Summary This came up in #9049. --- docs/configuration/files.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/configuration/files.md b/docs/configuration/files.md index 8c987a700..05dcbdb35 100644 --- a/docs/configuration/files.md +++ b/docs/configuration/files.md @@ -19,8 +19,9 @@ If a `pyproject.toml` file is found, uv will read configuration from the `[tool. example, to set a persistent index URL, add the following to a `pyproject.toml`: ```toml title="pyproject.toml" -[tool.uv] -index-url = "https://test.pypi.org/simple" +[[tool.uv.index]] +url = "https://test.pypi.org/simple" +default = true ``` (If there is no such table, the `pyproject.toml` file will be ignored, and uv will continue @@ -30,7 +31,9 @@ uv will also search for `uv.toml` files, which follow an identical structure, bu `[tool.uv]` prefix. For example: ```toml title="uv.toml" -index-url = "https://test.pypi.org/simple" +[[index]] +url = "https://test.pypi.org/simple" +default = true ``` !!! note