I think it's pretty damn amazing how well Python has been able to evolve into the realm of static typing. And no unofficial superset syntax required!
I think it's pretty damn amazing how well Python has been able to evolve into the realm of static typing. And no unofficial superset syntax required!
Pylance (the VSCode built-in linter, based on Pyright I believe) tends to do a better job than Mypy, but not as easy to integrate into CI. It's a real shame that the Python ecosystem doesn't have anything nearly as robust as TypeScript.
[0] https://github.com/python/mypy/issues?q=is%3Aopen+is%3Aissue...
Anyway I tried it on a mypy clean codebase and it gave a gazillion false positives so I never bothered to integrate it more properly.
Last I used it, it was miles ahead of mypy in terms of speed, easy-of-use (it's an LSP!), correctness (simply has less bugs), and feature completeness (has implemented every new static typing feature that I've wanted to use months ahead of mypy).
The maintainer was also super-responsive on Github: replied to my issues in hours/minutes, and often released minor versions with bugfixes one or two days after issues are reported.
Plus, at least half a dozen highly funded people have tried to recreate TypeScript and have failed. Microsoft is flawed, but they can make a mean type checker.