4 ms·
Ask HN: Which Python Type Checker?
I've worked with Python in the past but never went deep enough to compare the typecheckers. There are several: Pyre, Pyright, Mypy, Pytype.
It's unclear which is the best choice. I'd love to hear the take of a seasoned Python developer.
- darthrupert 4y agoI've had best experiences with pyright, i.e. fewer false negatives, reasonable speeds and good error messages.
- parentheses 4y agoThank you. That’s what I started with last night. That was the default on my previous project as well. It seemed like a good shortcut decision. What kinds of false negatives are we talking about? Are you referring to mixing untyped and typed code? How is the support for libraries? Does support depend on using one typechecker in particular?
- anthonyhn 4y agoI typically use mypy. It's been around for over a decade, is available in many package repos, and has pretty good integration with vim lint plugins such as ALE (https://github.com/dense-analysis/ale https://github.com/dense-analysis/ale).