Skip to content

Commit e31f000

Browse files
authored
Add an experimental uv format command (#15017)
As a frontend to Ruff's formatter. There are some interesting choices here, some of which may just be temporary: 1. We pin a default version of Ruff, so `uv format` is stable for a given uv version 2. We install Ruff from GitHub instead of PyPI, which means we don't need a Python interpreter or environment 3. We do not read the Ruff version from the dependency tree See astral-sh/ruff#19665 for a prototype of the LSP integration.
1 parent 8d6ea3f commit e31f000

File tree

22 files changed

+1110
-5
lines changed

22 files changed

+1110
-5
lines changed

Cargo.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ license = "MIT OR Apache-2.0"
2121

2222
[workspace.dependencies]
2323
uv-auth = { path = "crates/uv-auth" }
24+
uv-bin-install = { path = "crates/uv-bin-install" }
2425
uv-build-backend = { path = "crates/uv-build-backend" }
2526
uv-build-frontend = { path = "crates/uv-build-frontend" }
2627
uv-cache = { path = "crates/uv-cache" }

crates/uv-bin-install/Cargo.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[package]
2+
name = "uv-bin-install"
3+
version = "0.0.1"
4+
edition = { workspace = true }
5+
rust-version = { workspace = true }
6+
homepage = { workspace = true }
7+
documentation = { workspace = true }
8+
repository = { workspace = true }
9+
authors = { workspace = true }
10+
license = { workspace = true }
11+
description = "Binary download and installation utilities for uv"
12+
13+
[lib]
14+
doctest = false
15+
16+
[lints]
17+
workspace = true
18+
19+
[dependencies]
20+
uv-cache = { workspace = true }
21+
uv-client = { workspace = true }
22+
uv-distribution-filename = { workspace = true }
23+
uv-extract = { workspace = true }
24+
uv-pep440 = { workspace = true }
25+
uv-platform = { workspace = true }
26+
fs-err = { workspace = true, features = ["tokio"] }
27+
futures = { workspace = true }
28+
reqwest = { workspace = true }
29+
reqwest-middleware = { workspace = true }
30+
reqwest-retry = { workspace = true }
31+
tempfile = { workspace = true }
32+
thiserror = { workspace = true }
33+
tokio = { workspace = true }
34+
tokio-util = { workspace = true }
35+
tracing = { workspace = true }
36+
url = { workspace = true }
37+

0 commit comments

Comments
 (0)