:wave:<p>Looks like you found the not-so-secret repository we're using to prepare for a broader announcement :)<p>Please be aware this is pre-alpha software. The current version is 0.0.0a6 and the releases so far are all in service of validating our release process. We're excited to get this in people's hands, but want to set the expectation that we still have a lot of work left to do before this is production ready.<p>Stay tuned for more for news in the near future!<p>(... I work at Astral)
I gave away the “ty” project name on pypi to Astral a week or so ago. I wanted to use it for a joke a few years ago but this is a much better use for a two letter project name. They agreed to make a donation to the PSF to demonstrate their gratefulness.
The way these type checkers get fast is usually by not supporting the crazy rich reality of realworld python code.<p>The 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.<p>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".
Just compared the time to check on a fairly large project:<p>- mypy (warm cache) 18s<p>- ty: 0.5s (and found 3500 errors)<p>They've done it again.
Not the most fun question, but as I see Astral taking over the python ecosystem, I can't help but wonder: how do y'all plan to make money? It seems like you've taken VC funding, so monetization is inevitable.
prior to astral appearing, python's tooling has been beyond terrible, compared to say, Java's<p>astral have now replaced the awful pip with the fantastic uv<p>various awful linters with with the fantastic ruff<p>and now hopefully replacing the terrible type checkers (e.g. mypy) with a good one!<p>I hope they have the pypi backend on their list too, my kingdom for Maven Central in python!
Very excited to have a new fully featured Python language server working in both vscode and vscode forks (e.g. Windsurf, Cursor).<p>Pylance is borked on these forked distributions, so having a new solid alternative here that doesn't involve adopting yet another forked Pyright implementation (BasedPyright, Cursor Pyright, Windsurf Pyright, ...) sounds great to me.
Interesting to see astral come out with this right around facebook’s release of “Pyrefly, a faster Python type checker written in Rust”.<p>Not making any sort of ethical statement, just interesting that rust keeps eating the python and JS tooling worlds.
I am literally checking HackerNews while I wait for mypy to finish running, so I am excited to hear a faster type checker is on the way! Hope the error messages are also helpful.
Awesome work. What is the business model for these astral tools? It’s a bit of a “waiting for the other shoe to drop” feeling after seeing the VC backing on the company page.
I've been looking forward to this since the original announcement (and before, really).<p>On the modest codebase I tried it on (14k LOC across 126 files), it runs in 149ms compared to 1.66s in pyright (both run via uvx <tool>). I couldn't get it to play nicely with a poetry project, but it works fine (obviously) in a uv project.<p>Definitely some false-positives, as expected. Interestingly, it seems to hate the `dict()` initializer (e.g. `dict(foo="bar")`).
Probably not a top priority but it would be really really cool if this thing had solid t-string support from the jump, to the extent that it’s feasible without actually executing code
Perhaps a silly question. Will ty be usable for getting semantical completions / suggestions. Similar to using pyright to get completions based on what's being written.
See the thing about astral is that they get why Python has been successful in the first place:<p>When it was released it might have been one of the easiest to use languages.<p>The focus on tooling and making the tooling fast has been sharp. Seeing people recommend using non-astral tooling seems nuts at this point.
Fingers 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.
I installed it in VSCode and removed Mypy, I haven't looked back: <a href="https://marketplace.visualstudio.com/items/?itemName=astral-sh.ty" rel="nofollow">https://marketplace.visualstudio.com/items/?itemName=astral-...</a>
Looks good but it has the same issues that i have with mypy. Packages that don't include the type hints blow-up my process. In mypy i've come to terms with strategically ignoring packages or finding a package of type hints.
Mypy is runs cleanly on my project but I get >800 errors with TY, mostly things like:<p>lint:unresolved-import: Cannot resolve imported module `pydantic`
--> vartia/usr_id.py:4:6
|
2 | from typing import Optional, Any
3 | from enum import Enum
4 | from pydantic import BaseModel, ConfigDict<p>looking forward to the release version.
uv is an incredible tool ; ty will be also. It's insanely fast<p>For now, I have some false negative warnings :<p>'global' variables are flagged as undefined `int:unresolved-reference: Name ... used when not defined` (yeah, it's bad, I know)<p>f(*args) flagged as missing arguments `lint:missing-argument: No arguments provided for required parameters ...`
This will be similar to Typescript I assume? If so I can’t wait to use it!! I cant count how many times I’ve searched for “TS like in Python” since I’ve started working on Python codebase. TS is so awesome that I use it 100% on new projects. Ruff is also very good, but with this, large code base Python will be a breeze to work with
Recently I started a python project and I wanted to do it the "proper" way. mypy + pylint. But even on this small 15-20kloc program these tools are way to slow to do anything in realtime. It takes double digit seconds to have feedback. Way to long for an LSP. I'm honestly appalled the state of affairs is this bad. What the hell do people do with moderately or even large sized code bases?