Comparing Python Type Checkers: Typing Spec Conformance
ocamoss
104 points
42 comments
March 16, 2026
Related Discussions
Found 5 related stories in 44.0ms across 3,471 title embeddings via pgvector HNSW
- Someone just converted Claude Leark from TypeScript to 100% Python iamsyr · 19 pts · March 31, 2026 · 39% similar
- PyTheory Is Awesome zdw · 14 pts · March 25, 2026 · 39% similar
- Async Python Is Secretly Deterministic KraftyOne · 69 pts · April 03, 2026 · 36% similar
- Typing and Keyboards jpmitchell · 35 pts · March 29, 2026 · 34% similar
- A sufficiently detailed spec is code dokdev · 11 pts · March 18, 2026 · 34% similar
Discussion Highlights (10 comments)
persedes
Article is a nice write up of https://htmlpreview.github.io/?https://github.com/python/typ... (glad they include ty now)
Pay08
I still can't get over the utter idiocy in Python's type hints being decorative. In what world does x: int = "thing" not give someone in the standardisation process pause?
martinky24
I've been using ty on some previously untyped codebases at work. It does a good job of being fast and easy to use while catching many issues without being overly draconian. My teammates who were writing untyped Python previously don't seem to mind it. It's a good addition to the ecosystem!
ddxv
I've used mypy forever and never even tried these others. Looking at them though it looks like it's worth trying out Zuban or Pyright? Is there a noticeable benefit when switching between different checkers?
Scene_Cast2
Are there any good static (i.e. not runtime) type checkers for arrays and tensors? E.g. "16x64x256 fp16" in numpy, pytorch, jax, cupy, or whatever framework. Would be pretty useful for ML work.
extr
Wow, quite surprising results. I have been working on a personal project with the astral stack (uv, ruff, ty) that's using extremely strict lint/type checking settings, you could call it an experiment in setting up a python codebase to work well with AI. I was not aware that ty's gaps were significant. I just tried with zuban + pyright. Both catch a half dozen issues that ty is ignoring. Zuban has one FP and one FN, pyright is 100% correct. Looks like I will be converting to pyright. No disrespect to the astral team, I think they have been pretty careful to note that ty is still in early days. I'm sure I will return to it at some point - uv and ruff are excellent.
pgwalsh
Using VSCodium I was having issues with python type checkers for quite a while. I did the basedpyright thing for a while but that was painful. It's a bit too based for me, and I'm not sure i'd call it based. Right now I have uv, ruff, and ty and I'm happy with it. It's super easy to update and super fast. I didn't realize the coverage wasn't as good as some others but I still like it. I may have to try pyrefly. Never heard of it until this post, so thank you.
IshKebab
Interesting. This is the first I've heard of Zuban. The fact that Mypy fails so badly matches my experience. It would be interesting to see exactly where Pyright "fails". It's been so reliable to me I wouldn't be 100% surprised if these are deliberate deviations from the spec, where it is dumb.
refactor_master
How does Zuban manage to be developed by what appears to be a single person without megacorp backing, yet be mere inches behind pyright at this stage?
Neywiny
This is great and I'll try out pyright ASAP on my current codebase. The people who wrote it evidently didn't have any type checking running (despite I think 3+ linters??) so it's a nightmare of > "well the checker accurately reports it will be type X in an error case not Y" > "but we never get type X" > "Then we don't have good enough coverage" It's so easy in vscode, but it isn't on by default like the c/c++ one I guess because too much legacy code would cause infinite errors. And the age old problem of .pyi files lying about types.