-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Todo
- Ty (on hold)
- Too new e.g. Generic protocol support isn't complete yet support generic protocols in typevar solving astral-sh/ty#1714
- Pyrefly (done!)
- Quirk: version ≤ 0.46.2 ignores
typing_extensions, version ≥ 0.47 breaks JSON output
- Quirk: version ≤ 0.46.2 ignores
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)
- Unusable unless using most simplistic installation layout under Windows. Situation is better under Linux and MacOS. Panic: "Did not find a typeshed folder" when installed via uv with UV_LINK_MODE=symlink zubanls/zuban#240
- Doesn't support
typing_extensions - Doesn't support custom type-ignore prefix and solely relies on 'type: ignore', making it only viable as a mypy substitute, and not good for working together with multiple type checkers
| 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.LoggerAdapteris a non-generic class - Fail to import external
cssselectannotation
| Vendor | |
|---|---|
| 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 | |
|---|---|
| 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:
- Autocomplete doesn't work for private attributes of base classes
- Autocompletion not works for function_starting with _
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 |
Sub-issues
Metadata
Metadata
Assignees
Labels
Projects
Status