This feels like feature creep. I've been using uv more and more over the past year (mostly because I work with projects that use it) and although I like it and recognize the advantages, it is still not my first choice, and this kind of thing isn't going to help that...
I enjoy using uv a lot but am getting afraid that it is getting bloated for no reason. For ex., the number of niche flags that a lot of subcommands support is very high + some of them seemingly achieve the same result(uv run --no-project and uv run --active). I'd rather them working on improving existing tools and documentation than adding new (redundant) functionality
I don’t understand why adding a subcommand to uv is being considered bloat.
uv is already a complex tool, but it has excellent documentation. Adding a straightforward, self-explanatory subcommand like this doesn’t seem out of place.
It wouldn't surprise me if the ruff featurset eventually gets integrated into uv and ty. The linting seems to better suited to ty which would be able to provide more intelligent linting since it understands the codebase better. And the formatting seems better suited to uv since that's all about managing your project.
I'd rather `ruff` being merged with `ty` instead. `uv` for me is about package / project manager. It's not about code style. The only time `uv` should edit a code file is to update its dependencies (PEP 723).
On the other hand, both `ruff` and `ty` are about code style. They both edit the code, either to format or fix typing / lint issues. They are good candidates to be merged.
And I would think the next logical step here is to have a `uv lint` option here that runs ˋty` under the hood ?
I would love to see a world where there is a single or a set of standard commands that would prepare your python project (format, lint, test, publish). Maybe that’s the vision here?
Meanwhile, they provide identical functionality. (`Under the hood, it calls Ruff’s formatter to automatically style your code according to consistent standards.`)
internally, they are working on ty and some of its logic is going to have to call out to uv. I imagine that things like this is being built to experiment with some of the connections and interfaces between tools.
The astral team is pretty responsive to questions and feedback. If this type of change concerns you (as an actual user of the tool) please reach out to them. My big thing right now is integrations with workspaces. And if special case commands is the answer,,, well not ideal but I’ll take it.
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.
Mixing a package manager, (which is needed for prod package installs) with dev-only tooling is analogous to an "attractive nuisance" (not that I'm saying anyone is a child mind). I know Go and Rust do it, but thinking from first principles, it sounds like a bad idea.
Cool. I want a do it all python tool. Ruff is great. Having it out of the box with uv is great. Less crap to mess with. I haven’t tried ty yet, but looking forward to not having to mess with pyright.
Having worked with many python repos, that didn’t know any better to follow conventions or that the tooling ecosystem has meaningful options, I am ecstatic to see formatting and linting be a first class feature of the modern python experience.
I know this is a hot take, but so much headache saved down the road to “force” this stuff up front.
Does it have to be "force" stuff up front? Surely there are less violent ways to ease new developers into conventions and tooling than the dictatorial approach.
I anticipate this will make it much easier for me to get my little team of actuaries formatting their code.
The impact of uv on our onboarding and utilisation of python has already been huge, and any way I can easily improve their code hygiene is a good one. Yes, I could get them to use ruff standalone, or set up pre-commit hooks etc for them, but the simple mental model that comes from `uv <do something>` is really beneficial.
Will have a play around with this and see how it goes. Would love to be able to hook into other formatters too, but not sure if that's easy or even possible already. For example, I would love it if `uv format` also formatted our SQL/dbt models.
At that point I think you start wanting Makefiles, or preferably IMO justfiles. Then you can run `just format` and have it format your combined Python/SQL/Bash/TypeScript project.
Anyone from uv reading this?
please scrap this thing, there is a separate formatter ruff that anyone ll use if they want a formatter. please do not complicate stuff. ruff ll come with its own configuration. this will have its own config at some point. potential rule clashes, ignore plugins. please do not go in this direction
44 comments
[ 6.9 ms ] story [ 63.9 ms ] threadHave developers really been waiting for this? What's wrong with ruff format?
uv is already a complex tool, but it has excellent documentation. Adding a straightforward, self-explanatory subcommand like this doesn’t seem out of place.
This smacks of feature-creep and I won't be incorporating it into any pipelines for the foreseeable future.
On the other hand, both `ruff` and `ty` are about code style. They both edit the code, either to format or fix typing / lint issues. They are good candidates to be merged.
I would love to see a world where there is a single or a set of standard commands that would prepare your python project (format, lint, test, publish). Maybe that’s the vision here?
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.`)
The astral team is pretty responsive to questions and feedback. If this type of change concerns you (as an actual user of the tool) please reach out to them. My big thing right now is integrations with workspaces. And if special case commands is the answer,,, well not ideal but I’ll take it.
Wary of the vc funded aspect though…
I know this is a hot take, but so much headache saved down the road to “force” this stuff up front.
The impact of uv on our onboarding and utilisation of python has already been huge, and any way I can easily improve their code hygiene is a good one. Yes, I could get them to use ruff standalone, or set up pre-commit hooks etc for them, but the simple mental model that comes from `uv <do something>` is really beneficial.
Will have a play around with this and see how it goes. Would love to be able to hook into other formatters too, but not sure if that's easy or even possible already. For example, I would love it if `uv format` also formatted our SQL/dbt models.
Even moreso in the LLM age of tooling and coding agents.