Avoid rendering pyproject.toml examples for more system-level settings (#17462)

Following #16918, mark additional system-level settings as
`uv_toml_only` so they don't appear in the `pyproject.toml`
documentation examples:

- `native-tls`
- `cache-dir`
- `python-install-mirror`
- `pypy-install-mirror`
- `python-downloads-json-url`

Eventually, we'll want to ban these in the `pyproject.toml` without some
opt-in.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Zanie Blue
2026-01-14 12:18:35 -06:00
committed by GitHub
parent a4327c21b4
commit 0843c4d832

View File

@@ -212,6 +212,7 @@ pub struct GlobalOptions {
#[option(
default = "false",
value_type = "bool",
uv_toml_only = true,
example = r#"
native-tls = true
"#
@@ -243,6 +244,7 @@ pub struct GlobalOptions {
#[option(
default = "None",
value_type = "str",
uv_toml_only = true,
example = r#"
cache-dir = "./.uv_cache"
"#
@@ -1040,6 +1042,7 @@ pub struct PythonInstallMirrors {
#[option(
default = "None",
value_type = "str",
uv_toml_only = true,
example = r#"
python-install-mirror = "https://github.com/astral-sh/python-build-standalone/releases/download"
"#
@@ -1056,6 +1059,7 @@ pub struct PythonInstallMirrors {
#[option(
default = "None",
value_type = "str",
uv_toml_only = true,
example = r#"
pypy-install-mirror = "https://downloads.python.org/pypy"
"#
@@ -1066,6 +1070,7 @@ pub struct PythonInstallMirrors {
#[option(
default = "None",
value_type = "str",
uv_toml_only = true,
example = r#"
python-downloads-json-url = "/etc/uv/python-downloads.json"
"#