| ▲ | IshKebab 5 days ago |
| This is obviously a great move. I don't know why so many commenters here are against making things better. "Can't you just do <this slightly worse thing> already?". Well yes. But it's slightly worse. |
|
| ▲ | wasabi991011 5 days ago | parent | next [-] |
| I don't think being one word longer ("uvx ruff format" vs "uv format") counts as being is worse. I think it is much worse to create a special case that obscures the actual formatter being run and how it is being run (is ruff now preinstalled, or is it downloaded and cached in the same way as other tools?) |
| |
| ▲ | Feuilles_Mortes 4 days ago | parent | next [-] | | But you have to know about ruff. I didn't, but I did know about uv. | | |
| ▲ | wasabi991011 4 days ago | parent | next [-] | | Not really. If you know about uv, you know how to use "uv tool run", so you know how to use any formatter of your choice (which you can find easily on Google, arguably easier than reading the documentation and learning about uv format). | | |
| ▲ | IshKebab 4 days ago | parent | next [-] | | He said "you have to know about ruff". You're not really refuting that by saying "no you don't, you can just google it". | |
| ▲ | jamienicol 4 days ago | parent | prev [-] | | But I don’t know what the formatter of choice is. Nor do I care what it is. I just want to format my code |
| |
| ▲ | zelphirkalt 4 days ago | parent | prev [-] | | Well, it is arguably worse to run an unknown, not version pinned, unconfigured formatter over your code and expect it to improve things, unless the code is an utter catastrophe in terms of formatting. | | |
| ▲ | wiseowise 4 days ago | parent [-] | | It is completely irrelevant. You’re offloading responsibility to uv devs in this case. | | |
| ▲ | zelphirkalt 4 days ago | parent [-] | | _You_ may find it irrelevant, but speak for yourself. I don't want dependencies, that are not version-pinned and checksummed running over my code. It is certainly not irrelevant to me. | | |
| ▲ | wiseowise 4 days ago | parent [-] | | That’s for uv for decide. If you don’t like what it does - don’t use uv. |
|
|
|
| |
| ▲ | wiseowise 4 days ago | parent | prev [-] | | Let me rewrite your comment a little bit to make clearer what you’re saying. > I don’t think additional complexity counts as being worse. Yes, it does. |
|
|
| ▲ | Spivak 5 days ago | parent | prev | next [-] |
| 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. |
| |
| ▲ | nmca 5 days ago | parent | next [-] | | right, but you definitely shouldn’t be using any other formatter than ruff and this helps with that | |
| ▲ | nikisweeting 5 days ago | parent | prev | next [-] | | 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 | |
| ▲ | nickserv 4 days ago | parent | prev [-] | | 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. | | |
| ▲ | IshKebab 4 days ago | parent | next [-] | | That wasn't my experience. I tried it on a large project and about 1% of lines were changed. Not a big deal IMO but enough for naysayers to complain. | |
| ▲ | LtWorf 4 days ago | parent | prev [-] | | 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 :) | | |
| ▲ | LtWorf 4 days ago | parent [-] | | Thanks for the downvotes. Really shows that you have no familiarity with black. |
|
|
|
|
| ▲ | lugao 4 days ago | parent | prev [-] |
| Strong agree, they can even make the formatter configurable in pyproject if you want to use something else. |