by olive-n · 1mo ago · 0 comments
This seems like astral realizing they lost the type checker race and now fold it into their popular project so people have a reason to use it.
If it is already installed with uv, people have less reason to look for a type checker and will just stay with the default option.
It's somewhat ironic that they're only just getting around to it actually. The predecessor to `uv`, `rye`, had integration for `ruff` fairly early on - but Astral have really dragged their heels on putting it into `uv` (presumably because `ruff` had already won) and even now aren't adding support until after `ty` is integrated.
I am tasked with creating a new baseline for python projects. My first hunch was uv, ty, ruff as I've had a good time with them in the past.
What would you recommend?
These days all my project use uv for project management and ruff for linting and formatting.
I believe there is no obvious default for type checking yet. I use whatever my IDE provides. So e.g. pylance in VSCode, which is build on pyright.
There are currently pretty much 3 projects that I look out for: ty, zuban and pyrefly.
At this point, pyrefly seems to me to be the furthest along with support for many common libraries like pytest, pydantic, django, pandas/polars. And meta actually positions it as a production ready system and not a (pre?)beta. Which is why I decided to test drive it.
I have not directly compared the type checkers, I cannot give you a recommendation. For all I know zuban or ty could be the better choice.
uv and ruff took over because they were in many ways simpler and much faster than the competition. ty does not have that luxury.
However, it remains to be seen to what degree that speed difference is due to ty's smaller feature footprint. It just doesn't seem to check the same things. I found it too permissive, personally.
With AI able to quickly solve the adoption and migration, it just became a matter of picking the best tool - pyrefly has everything and is faster than ty.
They did the same thing with ruff too. A totally optional interface through the uv command. Use it or not.