TE
TechEcho
StartseiteTop 24hNeuesteBesteFragenZeigenJobs
GitHubTwitter
Startseite

TechEcho

Eine mit Next.js erstellte Technologie-Nachrichtenplattform, die globale Technologienachrichten und Diskussionen bietet.

GitHubTwitter

Startseite

StartseiteNeuesteBesteFragenZeigenJobs

Ressourcen

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. Alle Rechte vorbehalten.

Ty: A fast Python type checker and language server

835 Punktevon arathorevor 1 Tag

37 comments

zanievor etwa 23 Stunden
:wave:<p>Looks like you found the not-so-secret repository we&#x27;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&#x27;re excited to get this in people&#x27;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)
评论 #43919942 未加载
评论 #43919746 未加载
评论 #43923269 未加载
评论 #43919798 未加载
评论 #43919403 未加载
评论 #43924441 未加载
评论 #43920924 未加载
ngoldbaumvor etwa 22 Stunden
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.
评论 #43923073 未加载
评论 #43920403 未加载
评论 #43921777 未加载
评论 #43921877 未加载
评论 #43921873 未加载
评论 #43923856 未加载
aleksanbvor etwa 23 Stunden
The way these type checkers get fast is usually by not supporting the crazy rich reality of realworld python code.<p>The reason we&#x27;re stuck on mypy at work is because it&#x27;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 &quot;what&#x27;s in the wild IS the language&quot;, as opposed to a &quot;we only typecheck the constructs we think you SHOULD be using&quot;.
评论 #43919304 未加载
评论 #43919340 未加载
评论 #43919802 未加载
评论 #43926436 未加载
评论 #43919644 未加载
评论 #43923277 未加载
评论 #43919490 未加载
tmvphilvor 1 Tag
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&#x27;ve done it again.
评论 #43919324 未加载
评论 #43918779 未加载
评论 #43918924 未加载
评论 #43919184 未加载
hamandcheesevor etwa 7 Stunden
Not the most fun question, but as I see Astral taking over the python ecosystem, I can&#x27;t help but wonder: how do y&#x27;all plan to make money? It seems like you&#x27;ve taken VC funding, so monetization is inevitable.
评论 #43925477 未加载
Handprint4469vor etwa 24 Stunden
If you have uv installed, you can test it without installing by running:<p><pre><code> uvx ty check</code></pre>
评论 #43919200 未加载
评论 #43919157 未加载
评论 #43920733 未加载
blibblevor etwa 20 Stunden
prior to astral appearing, python&#x27;s tooling has been beyond terrible, compared to say, Java&#x27;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!
评论 #43921214 未加载
评论 #43921347 未加载
评论 #43922660 未加载
评论 #43921087 未加载
评论 #43922002 未加载
rexledesmavor etwa 22 Stunden
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&#x27;t involve adopting yet another forked Pyright implementation (BasedPyright, Cursor Pyright, Windsurf Pyright, ...) sounds great to me.
评论 #43920152 未加载
krupanvor etwa 23 Stunden
Have these guys figured out how to make money yet?
评论 #43919515 未加载
评论 #43920500 未加载
评论 #43920887 未加载
评论 #43923562 未加载
nickaglianovor etwa 23 Stunden
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.
评论 #43919426 未加载
评论 #43919139 未加载
评论 #43919096 未加载
评论 #43924648 未加载
评论 #43919181 未加载
评论 #43921068 未加载
评论 #43921077 未加载
cristeavor etwa 22 Stunden
Will it support Django stubs? Only blocker for my company to switch
pamelafoxvor etwa 13 Stunden
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.
评论 #43925826 未加载
no_timevor etwa 13 Stunden
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.
评论 #43923693 未加载
The-Ludwigvor etwa 9 Stunden
If this will be only 50% as awesome as ruff or uv, it will be a future must-have for me.
throwaway63467vor etwa 24 Stunden
I was wondering when someone would write a type checker in Rust, seemed like an obvious thing to do given how slow mypy is.
评论 #43920516 未加载
urbandw311ervor etwa 22 Stunden
It’s like when we hit a new month the quota of “talk about Rust” credits is renewed.
评论 #43921829 未加载
评论 #43922425 未加载
tiltowaitvor etwa 19 Stunden
I&#x27;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 &lt;tool&gt;). I couldn&#x27;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=&quot;bar&quot;)`).
评论 #43922832 未加载
pizzavor etwa 20 Stunden
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
Affricvor etwa 20 Stunden
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.
Sariosvor etwa 15 Stunden
Perhaps a silly question. Will ty be usable for getting semantical completions &#x2F; suggestions. Similar to using pyright to get completions based on what&#x27;s being written.
评论 #43925841 未加载
kodablahvor etwa 23 Stunden
Fingers crossed this is&#x2F;becomes extensible. Pyright and MyPy both suffer from lack of extensibility IMO (Pyright doesn&#x27;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.
评论 #43920133 未加载
评论 #43919190 未加载
joshdavhamvor etwa 21 Stunden
Any plans to create an official ty github action? I&#x27;ve been loving the ruff github action.
simlevesquevor etwa 23 Stunden
I installed it in VSCode and removed Mypy, I haven&#x27;t looked back: <a href="https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items&#x2F;?itemName=astral-sh.ty" rel="nofollow">https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items&#x2F;?itemName=astral-...</a>
dhruv3006vor etwa 3 Stunden
Great job!
tayo42vor etwa 22 Stunden
Curious why so many people want to implement type checkers for python? What problems are being solved that aren&#x27;t covered already?
评论 #43920952 未加载
评论 #43920805 未加载
评论 #43920326 未加载
briandwvor etwa 21 Stunden
Looks good but it has the same issues that i have with mypy. Packages that don&#x27;t include the type hints blow-up my process. In mypy i&#x27;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 &gt;800 errors with TY, mostly things like:<p>lint:unresolved-import: Cannot resolve imported module `pydantic` --&gt; vartia&#x2F;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.
评论 #43920802 未加载
TeeMassivevor etwa 3 Stunden
Glad to see that we have the type-checking equivalent of Ruff!
f311avor etwa 22 Stunden
Does it support go to definition and other lsp features?
评论 #43919885 未加载
ljouhetvor etwa 20 Stunden
uv is an incredible tool ; ty will be also. It&#x27;s insanely fast<p>For now, I have some false negative warnings :<p>&#x27;global&#x27; variables are flagged as undefined `int:unresolved-reference: Name ... used when not defined` (yeah, it&#x27;s bad, I know)<p>f(*args) flagged as missing arguments `lint:missing-argument: No arguments provided for required parameters ...`
评论 #43924207 未加载
cyounkinsvor etwa 18 Stunden
How does Astral plan on making money?
评论 #43921733 未加载
robertwt7vor etwa 21 Stunden
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
评论 #43920785 未加载
sestepvor etwa 21 Stunden
Is this the same thing as Red Knot?
评论 #43920769 未加载
drcongovor etwa 23 Stunden
I&#x27;ve been looking forward to this for what seems like an age.
评论 #43919066 未加载
rowanG077vor etwa 20 Stunden
Recently I started a python project and I wanted to do it the &quot;proper&quot; 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&#x27;m honestly appalled the state of affairs is this bad. What the hell do people do with moderately or even large sized code bases?
评论 #43921731 未加载
评论 #43921622 未加载
评论 #43920879 未加载
joejoovor etwa 22 Stunden
Astral killing it with the Python tooling.
ivanbelenkyvor etwa 18 Stunden
holy shit this is happening
canterburryvor etwa 20 Stunden
How about we just stop creating non type safe languages. Would save everyone so much hassle.<p>[bring on the downvotes]
评论 #43921612 未加载
评论 #43921604 未加载