Skip to content

Commit

Permalink
Use [[index]] API in configuration example (#9065)
Browse files Browse the repository at this point in the history
## Summary

This came up in #9049.
  • Loading branch information
charliermarsh authored Nov 12, 2024
1 parent 8ed37ee commit 95e7d87
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/configuration/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 95e7d87

Please sign in to comment.