News for hackers. Stuff that matters.
Re:Uv format: Code Formatting Comes to uv (experimentally) by cwyers on Thursday August 21, 2025 @05:35PM (#44978375)
The HN commenters in a nutshell:

ruff: Aww, you're sweet!

uv format: Hello, human resources?

Meanwhile, they provide identical functionality. (`Under the hood, it calls Ruff’s formatter to automatically style your code according to consistent standards.`)

Re:Uv format: Code Formatting Comes to uv (experimentally) by 0cf8612b2e1e on Thursday August 21, 2025 @05:50PM (#44978506)
But why do it? Keep each tool focused on its specific goal. Will there eventually be a call to deprecate ruff because it already exists in uv?

Both tools are still evolving enough that I would not want their individual release cycles to impact each other.

Re:Uv format: Code Formatting Comes to uv (experimentally) by charliermarsh on Thursday August 21, 2025 @05:56PM (#44978574)
Good questions. I don't think we'd ever deprecate Ruff because `uv format` exists, and adding `uv format` won't have any impact on Ruff's release cycles or development. The analogy would be to Cargo: `cargo fmt` just runs `rustfmt`, but you can also run `rustfmt` separately if you want.

A lot of users just want a simpler experience. They want to install uv, run `uv run` to run their project, `uv format` to format it, etc. The idea here is to experiment with providing that functionality and see if folks find it useful. Maybe they won't want it! It's experimental :)

Re:Uv format: Code Formatting Comes to uv (experimentally) by comradesmith on Thursday August 21, 2025 @06:04PM (#44978650)
Cause one is a formatter and the other is a package manager. That shouldn’t be hard to understand.
Re:Uv format: Code Formatting Comes to uv (experimentally) by nikisweeting on Thursday August 21, 2025 @06:09PM (#44978708)
Package managers providing a shortcut to call a standardized formatter is a very popular feature in many languages, also not hard to understand the appeal:

- cargo fmt

- go fmt

- deno fmt

- dart format

Re:Uv format: Code Formatting Comes to uv (experimentally) by agos on Friday August 22, 2025 @08:27AM (#44983703)
- mix format

too!

Re:Uv format: Code Formatting Comes to uv (experimentally) by chippiewill on Thursday August 21, 2025 @06:06PM (#44978677)
`uv` isn't a package manager (that's the `uv-pip` sub command), it's a project manager. It's meant to manage all aspects of the project.
Re:Uv format: Code Formatting Comes to uv (experimentally) by replygirl on Thursday August 21, 2025 @05:57PM (#44978586)
i expect to hear "hey replygirl, can we upgrade from ruff to uv format?" from 5 of my coworkers in the next month, and "what's the difference between ruff and uv format?" from another 10. per interaction i expect 2 minutes of reading and explaining, plus an average 5 minutes listening to the other party wax philosophical. so the convenience costs my job $400
Re:Uv format: Code Formatting Comes to uv (experimentally) by cwyers on Thursday August 21, 2025 @06:01PM (#44978626)
I'm just going to ask this: if your coworkers ask "can we upgrade from ruff to uv format," and it takes you that much time to explain it, have you just considered going "sure thing," spending two hours on Twitter, and pushing a commit and getting paid for it?
Re:Uv format: Code Formatting Comes to uv (experimentally) by replygirl on Thursday August 21, 2025 @06:19PM (#44978781)
now i've spent 2 minutes implementing, 1 minute drafting and assigning the pr, 10 minutes checking everything, 10 minutes each of two reviewers' time, 10 minutes of qa's time, and 1 minute reporting. it's also likely i spend 2 minutes explaining what it is to each of our PMs and our CTO and why they don't need to worry about it. then i still need to field questions from devs, this time "why did we change this?" and still "what's the difference?". so that costs the company even more.
Re:Uv format: Code Formatting Comes to uv (experimentally) by RossBencina on Friday August 22, 2025 @12:39AM (#44981042)
You know what would be easier, "no."
Re:Uv format: Code Formatting Comes to uv (experimentally) by zahlman on Thursday August 21, 2025 @05:48PM (#44978486)
Memes aside, the conceptual grouping of tools does matter.
Re:Uv format: Code Formatting Comes to uv (experimentally) by laurent_du on Friday August 22, 2025 @01:51AM (#44981401)
Yeah the reaction is weird. It's 100% optional. People just love to complain.