Todo
- Ty (on hold)
- Pyrefly (done!)
- Quirk: version ≤ 0.46.2 ignores
typing_extensions, version ≥ 0.47 breaks JSON output
Evaluation of type checker situations
Ty
Very new but fast and promising, though not ready for production use yet. Currently added support but disabled explicitly during runtime tests.
| Vendor |
Astral |
| OS |
Windows, Macos, Linux |
| Written in |
Rust |
Can validate .pyi |
Yes |
Pyrefly (implementation complete)
Successor of Pyre, fast like all other Rust-based type checkers. Needs a bunch of type-ignore comments, but otherwise almost ready for production use.
| Vendor |
Meta |
| OS |
Windows, Macos, Linux |
| Written in |
Rust |
Can validate .pyi |
Yes |
Zuban (plan shelved for now)
| Vendor |
Jedi author |
| OS |
Windows, Macos, Linux |
| Written in |
Rust |
Can validate .pyi |
Yes |
Pyre-check (target Pyrefly instead)
The support for PEP561 is new, so the current situation is still not fully evaluated. However some problems are immediately notable:
- Don't understand re-exported symbols (need to import directly from the file it is defined)
- Thinks
logging.LoggerAdapter is a non-generic class
- Fail to import external
cssselect annotation
| Vendor |
Facebook |
| OS |
MacOS, Linux |
| PEP561 support |
Yes (according to facebook/pyre-check#70 ) |
Can validate .pyi |
Unknown |
PyType (plan shelved for now)
Although not officially supported, typeshed has already been successfully using PyType in test suite by importing pytype.io.parse_pyi.
| Vendor |
Google |
| OS |
MacOS, Linux |
Can validate .pyi |
Hidden (via API) |
PyCharm (plan shelved for now)
Unfortunately the situation is unsatisfactory despite having PEP561 support. There are multiple unfixed issues involving underscored attributes and methods:
Underscored class names like _Element, _ElementTree are building blocks of lxml, which can't be lived without. Annotation of many function arguments become impossible without using them. But the degree of inconvenience introduced by bugs above seriously hinder UX of developers using lxml. It even induced well-intended yet unnecessary PR on types-lxml.
For now, putting to extreme, PyCharm should be avoided like plague until relevant bugs are fixed.
| Vendor |
JetBrains |
| OS |
Windows, MacOS, Linux |
| PEP561 support |
Yes |
Todo
typing_extensions, version ≥ 0.47 breaks JSON outputEvaluation of type checker situations
Ty
Very new but fast and promising, though not ready for production use yet. Currently added support but disabled explicitly during runtime tests.
.pyiPyrefly (implementation complete)
Successor of Pyre, fast like all other Rust-based type checkers. Needs a bunch of type-ignore comments, but otherwise almost ready for production use.
.pyiZuban (plan shelved for now)
typing_extensions.pyiPyre-check (target Pyrefly instead)
The support for PEP561 is new, so the current situation is still not fully evaluated. However some problems are immediately notable:
logging.LoggerAdapteris a non-generic classcssselectannotation.pyiPyType (plan shelved for now)
Although not officially supported,
typeshedhas already been successfully using PyType in test suite by importingpytype.io.parse_pyi..pyiPyCharm (plan shelved for now)
Unfortunately the situation is unsatisfactory despite having PEP561 support. There are multiple unfixed issues involving underscored attributes and methods:
Underscored class names like
_Element,_ElementTreeare building blocks oflxml, which can't be lived without. Annotation of many function arguments become impossible without using them. But the degree of inconvenience introduced by bugs above seriously hinder UX of developers usinglxml. It even induced well-intended yet unnecessary PR ontypes-lxml.For now, putting to extreme, PyCharm should be avoided like plague until relevant bugs are fixed.