4 ms·
Hopefully it gets added to this comparison: https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html https://
by frou_dh 10mo ago
Hopefully it gets added to this comparison:
https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html https://htmlpreview.github.io/?https://github.com/python/typ...
If that table is anything to go by, Pyright is not to be underestimated.
I have briefly tried ty (LSP) in Emacs and it seems to work well so far. The only questionable thing I've encountered is that when the signature of a method is shown, the type annotations of some parameters seem to be presented in a particularly verbose form compared to what I'm used to - maybe they're technically correct but it can be bit much to look at.
Anyway, odds are pretty good that ty is what I will end up using long-term, so thanks and congrats on releasing the first beta!
- _carljm 10mo agoWe'll be adding ourselves to that table soon. We'll have some work to catch up with pyright on conformance, but that's what the time between now and stable release is for.
- IshKebab 10mo agoPyright is really really good. Anyone that doubts that 10x engineers exist, just go and look at Eric Traut. He's pretty much written it single handedly. Absolute machine. Mypy is trash. Nice to have a table to point to to prove it.
- buibuibui 10mo agoOh my, I just looked him up. He is the developer of Virtual Game Station - a PS1 emulator that I used in the past to play PS Isos on my Windows ME PC! What a legend.
- jimmydoe 10mo agoWat Unbelievable
- davidhalter 10mo agoMypy is not trash at all. It is still the most precise type checker, supports a lot of complicated cases and has plugins that make a lot of things more type safe. I believe Mypy is severely underrated and a lot of people believe that it's not as good as Pyright because of the conformance tests. The problem is that the conformance tests were mostly written by Eric Traut, so there's a natural bias towards specifying what Pyright does well. There's a lot of things Mypy does really well that should probably be implemented in Pyright.
- progbits 10mo agopyright is very good, but there is also https://docs.basedpyright.com/latest/ https://docs.basedpyright.com/latest/ which improves on it further. That said I'm very happy user of uv, so once Ty becomes ready enough will be happy to migrate.
- conception 10mo agoBasedpyright plus any AI generated python is a hellscape unless you use hooks and have a lot of patience.
- WD-42 10mo agoPyright has been great. But it’s slow. Speed of a LSP does matter for UX. Excited to see how much ty improves on this.
- morkalork 10mo agoIs it wrong to to say that I don't like pyright on principle because it requires node.js and npm to install and run?
- cmclaughlin 10mo agoI feel the same way.
- wiz21c 10mo agoI think it is way to slow too. The one from microsoft (pylance IIRC) is better in my opinion.
- ameliaquining 10mo agoPylance's type checker is Pyright, so in that particular respect they're exactly the same.
- linhns 10mo agoPyright is a type checker, not a LSP per se in my opinion. ty is both.
- melodyogonna 10mo agoPyright is also an lsp, it implements the LSP spec, it is just slow.
- linhns 10mo agoNot that slow tbh, although compared to ty, it’s a snail
- hauntsaninja 10mo agoNote: while spec conformance is important, I don't recommend using it as the basis for choosing a type checker. It is not representative of the things that most users actually care about (and is not meant to be). (I was on the Python Typing Council and helped put together the spec, the conformance test suite, etc)
- SmileyKeith 10mo agoCan you add some examples of the things users care about that aren't well covered by this? I empathize with everyone who wants a feature comparison chart so they can be confident switching without unknowingly losing important safety checks.
- dcre 10mo agoI think the idea is not that there are features that aren’t listed, but rather that if a typechecker supports 10 features people care about and is missing 10 that people don’t really use, it will look a lot worse on a list like this than a typechecker with 100% compliance, when in practice it may not really be worse at all. Edit: Based on this other comment, the point was also about things not covered by the spec. “The spec mostly concerns itself with the semantics of annotations, not diagnostics or inference.” https://news.ycombinator.com/item?id=46296360 https://news.ycombinator.com/item?id=46296360
- codys 10mo agoThe chart does not describe speed (either in general or in any particular case). Speed/performance/latency is a thing users care about that is not included in the feature list.
- SmileyKeith 10mo agoYea that one is fine and well covered in the blog post, and pretty easy to spot in light testing. I'm much more worried about the ones that are harder to spot until you have a false negative that turns into a real bug which would be caught by 1 tool and not another.
- SSchick 10mo agohttps://github.com/python/typing/pull/2137 https://github.com/python/typing/pull/2137 PR is somewhat WIP-ish but I needed some motivation to do OSS work again :)
- CyberThijs 10mo agoFor those interested: the results page in this PR looks like this: https://htmlpreview.github.io/?https://github.com/SimonSchick/typing/blob/feat/add-ty/conformance/results/results.html https://htmlpreview.github.io/?https://github.com/SimonSchic...
- collinmanderson 10mo agoThanks. I really need better generics support before ty becomes useful. Currently decorators just make all return types unknown. I need something this to work: _F = TypeVar("_F", bound=Callable[..., Any]) def my_decorator(*args: str) -> Callable[[_F], _F]: ... Also, I use a lot of TypedDicts and there's not much support yet.