Interesting to see astral come out with this right around facebook’s release of “Pyrefly, a faster Python type checker written in Rust”. Not making any sort of ethical statement, just interesting that rust keeps eating the python and JS tooling worlds.
Ty: A fast Python type checker and language server
11–20 of 296 posts
Re: Ty: A fast Python type checker and language server
#12Interesting to see astral come out with this right around facebook’s release of “Pyrefly, a faster Python type checker written in Rust”. Not making any sort of ethical statement, just interesting that rust keeps eating the python and JS tooling worlds.
https://github.com/facebook/pyrefly/blob/a8626110da034f8e513...
Re: Ty: A fast Python type checker and language server
#13If you have uv installed, you can test it without installing by running: uvx ty check
uv tool install ty
Then you can use it anywhere ty checkRe: Ty: A fast Python type checker and language server
#14Re: Ty: A fast Python type checker and language server
#15Re: Ty: A fast Python type checker and language server
#16Interesting to see astral come out with this right around facebook’s release of “Pyrefly, a faster Python type checker written in Rust”. Not making any sort of ethical statement, just interesting that rust keeps eating the python and JS tooling worlds.
Re: Ty: A fast Python type checker and language server
#17Just compared the time to check on a fairly large project: - mypy (warm cache) 18s - ty: 0.5s (and found 3500 errors) They've done it again.
Indeed they have. Similar improvement in performance on my side.
It is so fast that I thought it must have failed and not actually checked my whole project.
Re: Ty: A fast Python type checker and language server
#18Fingers crossed this is/becomes extensible. Pyright and MyPy both suffer from lack of extensibility IMO (Pyright doesn't consider the use case and MyPy plugins come across as an afterthought with limited capabilities). There are many things that can be built on the back of type-checked AST.
Re: Ty: A fast Python type checker and language server
#19If you have uv installed, you can test it without installing by running: uvx ty check
cd /tmp
git clone https://github.com/simonw/sqlite-utils
cd sqlite-utils
uvx ty check
Here's the output: https://gist.github.com/simonw/a13e1720b03e23783ae668eca7f6f...Adding "time uvx ty check" shows it took:
uvx ty check 0.18s user 0.07s system 228% cpu 0.109 totalRe: Ty: A fast Python type checker and language server
#20The reason we're stuck on mypy at work is because it's the only type checker that has a plugin for Django that properly manages to type check its crazy runtime generated methods.
I wish more python tooling took the TS approach of "what's in the wild IS the language", as opposed to a "we only typecheck the constructs we think you SHOULD be using".