Ty 1.0: an extremely fast Python type checker and language server

185 points - today at 4:55 PM

Source

Comments

natsu529 today at 6:42 PM
Congrats on 1.0, this looks really interesting and I'd like to try it. Does ty have any story for Django / DRF yet? I rely on django-stubs and its mypy plugin for models and querysets, so I'm curious how ty handles that kind of dynamic behavior.
fishgoesblub today at 6:10 PM
Curious to see how Ty now compares to Pyrefly in practice. Had to switch from Ty because it was rather poor compared to Pyrefly at the time. A bit spoiled for choice in regards to Python type checkers now.
wilkystyle today at 6:05 PM
Congrats to the Astral team! I've been using ty since the alpha days. Was so excited to replace pylsp with it, and it's been a mainstay in my arsenal ever since. It's gotten so reliable over the past year or so that I forgot it was pre-1.0 software.
BoumTAC today at 7:15 PM
Too bad it doesn't support Django 6.

The real issue is that ty's Django support is still early: reverse relations and django-stubs aren't supported yet, and django-types is already lagging behind Django 6.

WD-42 today at 6:44 PM
Congrats to the Ty team. Been using it for a while now.

Funnily though I’ve started to care less about typing in Python. Since Rust got good most projects where I’d want strong types I’m not using Python anymore. Python is still great for glue code, as it was intended. Typing helps there if libraries have good support but I find myself writing Python type annotations less now. It’s always been a bit awkward and ugly in Python anyway.

BewareTheYiga today at 6:17 PM
Congrats! This is a huge milestone. Out of curiosity, what will it take to get Ruff and UV to 1.0.0?
ethnrob today at 5:13 PM
So if OpenAI owns Astral, and Microsoft has Pyright, don't two companies effectively dominate both Python and TypeScript ecosystems?

I have nothing against Ty, it is quite powerful, and released under MIT.

This blog post also tells us that Ty is used extensively at OpenAI, like we're meant to be impressed.

globular-toast today at 7:42 PM
I got excited when ty came out because the LSP experience was so much better than I had before with pylsp-mypy. But then I lost interest in programming due to AI. I've been watching the releases and it's pretty obvious there's a lot of "AI assisted" development going on. Kinda funny that they're using AI to make a tool which is pointless because of AI.
122339817 today at 6:19 PM
I thought everything can be vibe coded in Rust. Turns out OpenAI are Luddites and use Python.

Remember when Astral told us in 2024 they would not sell out?

ocamoss today at 6:28 PM
congrats to the team!
oiwdis today at 7:07 PM
[dead]
chrikrah today at 5:47 PM
Tried it on a 10k loc project which never had a type checker: 0.5s, 450 results. More than 400 of them are one pattern, a dict of kwargs splatted into a call (`*kw`). ty infers the dict as `dict[str, str | int]` and flags every parameter against that. Is there any way to type the dict once, or is a TypedDict the way to go?