Release Notes
Released on 2026-04-02.
Bug fixes
- Mark loop header assignments as used to avoid false positives in "unused variable" diagnostics (#24336)
LSP server
- Show constructor signature of classes when hovering over them (#24257)
Core type checking
- Avoid emitting cascading diagnostics when parsing invalid type expressions (#24326)
- Handle most "deep" mutual TypeVar constraints (#24079)
- Improve consistency and quality of diagnostics relating to invalid type forms (#24325)
- Improve robustness of various type-qualifier-related checks (#24251)
- Infer the
extra_itemskeyword argument to class-based TypedDicts as an annotation expression (#24362) - Use bidirectional inference to fix false positives on operations such as
x: list[int | None] = [None] * 2(#24197) - Sync vendored typeshed stubs (#24340). Typeshed diff
- Tighten up validation of subscripts and attributes in type expressions (#24329)
- Use
infer_type_expressionfor parsing parameter annotations and return-type annotations (#24353) - Use
infer_type_expressionfor validating PEP-613 type aliases (#24370) - Validate TypedDict fields when subclassing (#24338)
- Validate type qualifiers in functional TypedDict fields and the
extra_itemskeyword to functional TypedDicts (#24360) - Improve diagnostics for invalid functional
TypedDicts (#24345)
Contributors
Install ty 0.0.28
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.28/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.28/ty-installer.ps1 | iex"Download ty 0.0.28
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>