Re:Uv format: Code Formatting Comes to uv (experimentally)
by Spivak on Thursday August 21, 2025 @06:09PM
(#44978702)
I think the biggest thing is that it doesn't seem to support other formatters. If my project uses black I don't get to have uv format work for me.
[ Parent
| on HN ]
Re:Uv format: Code Formatting Comes to uv (experimentally)
by nmca on Thursday August 21, 2025 @08:18PM
(#44979765)
right, but you definitely shouldn’t be using any other formatter than ruff and this helps with that
Re:Uv format: Code Formatting Comes to uv (experimentally)
by nikisweeting on Thursday August 21, 2025 @06:16PM
(#44978757)
fwiw `ruff format` includes nearly all the black rules by default / supports a superset of black's options https://astral.sh/blog/the-ruff-formatter
Re:Uv format: Code Formatting Comes to uv (experimentally)
by nickserv on Friday August 22, 2025 @12:14AM
(#44980942)
Ruff pretty much follows the same rules as black, and can be made identical with some options tweaking.
So when I moved several projects from black to ruff, there were no changes made to the code.
Re:Uv format: Code Formatting Comes to uv (experimentally)
by LtWorf on Friday August 22, 2025 @12:50AM
(#44981097)
I find this hard to believe since black doesn't even have the same rules as black's next version and I never changed version without something being reformatted.
Also because of fun, if you reformat again with the older version it won't go back to as it was before :)