News for hackers. Stuff that matters.
Re:Uv format: Code Formatting Comes to uv (experimentally) by nikisweeting on Thursday August 21, 2025 @05:44PM (#44978455)
As long as it does `ruff check --fix; ruff format` internally and not just one or the other, then I'm happy. Tired of running 2 commands every time.
Re:Uv format: Code Formatting Comes to uv (experimentally) by 0cf8612b2e1e on Thursday August 21, 2025 @05:46PM (#44978473)
Also needs to make sorting imports a default.
Re:Uv format: Code Formatting Comes to uv (experimentally) by nikisweeting on Thursday August 21, 2025 @05:54PM (#44978549)
and stop removing extra leading whitespace before inline comments (#7684)
Re:Uv format: Code Formatting Comes to uv (experimentally) by zahlman on Thursday August 21, 2025 @05:46PM (#44978476)
FWIW, you can pretty easily script this sort of thing. In Bash it can even be a function added to your ~/.bashrc .
Re:Uv format: Code Formatting Comes to uv (experimentally) by nikisweeting on Thursday August 21, 2025 @05:48PM (#44978483)
Of course we already have it automated in pre-commit checks, I'm just mildly annoyed that it's two different commands in the first place (though I'm sure there is some good historical reason). The distinction/ordering between them isn't really clear as a user, I just want "find and fix everything you can, error if you cant autofix" every time.
Re:Uv format: Code Formatting Comes to uv (experimentally) by IshKebab on Thursday August 21, 2025 @05:57PM (#44978587)
Just so you know, when people say "I hate this paper cut", they aren't really asking how they can put in extra work to get around it. Obviously hey can add some alias to ~/.bashrc... on every computer he uses. The complaint is that he has to do that in the first place. It's still annoying.
Re:Uv format: Code Formatting Comes to uv (experimentally) by zahlman on Thursday August 21, 2025 @06:17PM (#44978767)
I prefer having things this way, because it respects the fact that I may have a different idea from the next person about how the pieces should be put together.
Re:Uv format: Code Formatting Comes to uv (experimentally) by aseipp on Thursday August 21, 2025 @06:35PM (#44978944)
OK and the vast majority of people excluding you and them probably have a very close-or-nearly-identical idea about what should happen. So everyone can be happy, there's nothing being lost here.
Re:Uv format: Code Formatting Comes to uv (experimentally) by nikisweeting on Thursday August 21, 2025 @06:20PM (#44978787)
no one is proposing removing the sub-commands, only adding a shortcut that calls both
Re:Uv format: Code Formatting Comes to uv (experimentally) by wiseowise on Friday August 22, 2025 @01:13PM (#44987063)
You can align it by hand, if you want.