uv/crates/uv-configuration
Zanie Blue b9419e67aa
Add preview mode and use for warning in uv run (#3192)
Adds hidden `--preview` / `--no-preview` flags with `UV_PREVIEW`
environment variable support. Copies the `PreviewMode` type from Ruff.

Does a little bit of extra work to port `uv run` to the new settings
model.

Note we allow `uv run` invocations without preview and only use its
presence to toggle an experimental warning.

## Test plan

```
❯ cargo run -q -- run --no-workspace -- python --version
warning: `uv run` is experimental and may change without warning.
Python 3.12.2
❯ cargo run -q -- run --no-workspace --preview -- python --version
Python 3.12.2
❯ UV_PREVIEW=1 cargo run -q -- run --no-workspace -- python --version
Python 3.12.2
```
2024-04-22 15:41:15 -05:00
..
src Add preview mode and use for warning in uv run (#3192) 2024-04-22 15:41:15 -05:00
Cargo.toml Add --python-platform to configuration (#3147) 2024-04-19 23:08:03 +00:00