An Update on Pytype
21–30 of 70 posts
Re: An Update on Pytype
#22I think this is for the best. I used Pytype at Google years ago and while it's well written and the team was responsive, ultimately Python is not well suited for type checking Python. It's compute intensive. I think the Ty people at Astral have the correct idea, and hope it'll work out. https://docs.astral.sh/ty/
In theory, nothing prevents the pytype team at Google to develop a new backend in a different language. In practice, there is no longer a pytype team at Google [ https://news.ycombinator.com/item?id=40171125 ], which I suspect is the real reason for the discontinuation.
Especially when, in my experience, each checker produces slightly different results on the same code, effectively creating its own slightly different language dialect with the associated fragmentation cost. In theory that cost could be avoided through more rigorous standardization efforts to ensure all the checkers work exactly the same way. But that would also reduce the benefit of writing a new type checker, since there would be less room to innovate or differentiate.
Re: An Update on Pytype
#23I'm surprised Google still maintained their own solution for this for so long. The standard for statically type checking Python nowadays is mypy.
Re: An Update on Pytype
#24Maybe they could do typechecking using an LLM agent? I'm sure they'd fund a team for that.
Re: An Update on Pytype
#25astral bags another one
Is ty more mature than pyright or mypy? I'm currently using pyright, but I'm going to migrate once ty and its vscode extension are given the "production ready" greenlight.
Re: An Update on Pytype
#26I'm surprised Google still maintained their own solution for this for so long. The standard for statically type checking Python nowadays is mypy.
The various features mypy didn't support include speed, type inference/graduality, and partial checking in the presence of syntax errors (for linter/interactive usecases and code completion).
Re: An Update on Pytype
#27> What alternatives can I consider? There are four Python static type checkers that can be considered: mypy and Pyright have been released to the community for a while and have well established user bases. Pyrefly, ty were announced recently at PyCon US 2025 and are in active development stage in the current time of August 2025 when this was written.
mypy - https://github.com/python/mypy
Pyright - https://github.com/microsoft/pyright
Pyrefly - https://github.com/facebook/pyrefly
Re: An Update on Pytype
#28as an aside, while I agree that bytecode-based analysis has its drawbacks, I think it's a tool worth having in the overall python toolbox. I spun off pycnite from pytype in the hope that anyone else who wanted to experiment with it would have an easier time getting started - https://github.com/google/pycnite
I have recently jumped onto the "write python tooling in rust" bandwagon and might look into a rust reimplementation of pycnite at some point, because I still feel that bytecode analysis lets you reuse a lot of work the compiler has already done for you.
Re: An Update on Pytype
#29Google lays off its Python team | Hacker News https://news.ycombinator.com/item?id=40171125
Re: An Update on Pytype
#30I'm surprised Google still maintained their own solution for this for so long. The standard for statically type checking Python nowadays is mypy.
1. it had powerful type inference over partially or even completely unannotated code, which meant no one has to go back and annotate the very large pre-type-checking codebase.
2. it had a file-at-a-time architecture which was specifically meant to handle the large monorepo without trying to load an entire dependency tree into memory at once, while still doing cross-module analysis
there were a couple of attempts to get mypy running within google, but the impedance mismatch was just too great.