Release Notes
Released on 2026-06-17.
Bug fixes
- Avoid cross-TypeVar leakage in generic inference (#26099)
- Fix panic from oscillating collection-use constraints (#26031)
- Preserve type variables in fixed tuple aliases (#26041)
- Respect ParamSpec binding contexts (#25993)
- Show bare
Finalas a special form on hover (#26029) - Support options in functional dataclass calls (#25989)
LSP server
- Add context-sensitive keyword completions (#26036)
- Fix wildcard import symbol range (#25740)
- Highlight decorated methods consistently (#26003)
- Preserve narrowing after qualified
TYPE_CHECKING(#26051) - Respect client's content format preference (#25957)
- Retain all diagnostic annotations in the server (#26006)
- Track unused-binding captures across nested scopes (#25536)
Diagnostics
- Fix override diagnostics for decorated methods (#25671)
- Improve
duplicate-basediagnostics (#26107) - Reject invalid dataclass flag combinations (#25985)
- Reject legacy TypeVars in PEP 695 class bases (#25975)
- Reject legacy TypeVars in PEP 695 functions (#25979)
- Respect
@no_type_checkin function validation (#25994)
Performance
- Avoid rebuilding unchanged specializations (#25826)
- Avoid redundant equality intersections (#26057)
- Avoid retaining empty use-def tables (#26018)
- Compact retained definition inference extras (#25838)
- Deduplicate retained scope inference types (#25846)
- Disable LRU tracking for one-shot checks (#26106)
- Fast path collection literals with exact type contexts (#25878)
- Flatten retained declaration states (#25912)
- Improve flow snapshot performance (#26012)
- Skip stub package checks in stub-free search paths (#25963)
- Speed up large-union narrowing (#26048)
- Speed up module resolution for projects with many search paths (#25962)
- Store cumulative binding end offsets (#25913)
- Use compact frozen representation for narrowing constraints (#25990)
Core type checking
- Annotate intersection and negation types using
&and~(#26035) - Diagnose zero-step slices on lists (#25966)
- Full-scope bidirectional inference for non-empty collection literals (#25280)
- Improve equality-based narrowing for
==,!=, andmatch(#25788) - Infer precise values for standard-library enums (#26103)
- Make equality evaluation cycle-aware (#26055)
- Narrow equality across IntEnum classes (#26079)
- Narrow tuple expression match subjects (#25874)
- Preserve literal types for loop variables over literal collections (#25083)
- Preserve negative narrowing for starred sequence patterns (#25927)
- Preserve non-final types in Hashable unions (#26039)
- Support enum literals as tagged-union discriminants (#25855)
- Sync vendored typeshed stubs (#25952). Typeshed diff
- Sync vendored typeshed stubs (#25997). Typeshed diff
- Synthesize NamedTuple
__match_args__(#25934) - Treat assigned enum hooks conservatively (#25958)
- Validate deprecated warning categories (#26025)
Contributors
- @AlexWaygood
- @MichaReiser
- @ankddev
- @sqqueak
- @lerebear
- @sharkdp
- @denyszhak
- @ibraheemdev
- @charliermarsh
Install ty 0.0.50
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.50/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.50/ty-installer.ps1 | iex"Download ty 0.0.50
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>