Releases: astral-sh/ty
0.0.51
Release Notes
Released on 2026-06-18.
Bug fixes
- Fix bound TypeVar default cycle recovery (#26124)
- Support
Annotated[Any, ...]as a class base (#26133)
LSP server
- Suggest keyword-only arguments between variadic parameters (#26134)
Core type checking
- Avoid assuming classes with
AnyorUnknownbases are descriptors (#26120) - Infer simpler types in complex lambda cycles (#26137)
- Preserve exact class objects during identity narrowing (#26117)
Diagnostics
- Preserve unpacking diagnostics for nested assignment targets (#26121)
Performance
- Compact indexed AST node storage (#25998)
- Discard dead DNF branches in intersection building (#26144)
Documentation
- Remove broken gradual guarantee link (#3806)
Contributors
Install ty 0.0.51
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.51/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.51/ty-installer.ps1 | iex"Download ty 0.0.51
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>0.0.50
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
| File | Platform | Checksum |
|---|---|---|
| ty-aarch64-apple-darwin.tar.gz | Apple Silicon macOS | checksum |
| ty-x86_64-apple-darwin.tar.gz | Intel macOS | checksum |
| ty-aarch64-pc-windows-msvc.zip | ARM64 Windows | checksum |
| ty-i686-pc-windows-msvc.zip | x86 Windows | checksum |
| ty-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| ty-aarch64-unknown-linux-gnu.tar.gz | ARM64 Linux | checksum |
| ty-i686-unknown-linux-gnu.tar.gz | x86 Linux | checksum |
| ty-powerpc64-unknown-linux-gnu.tar.gz | PPC64 Linux | checksum |
| ty-powerpc64le-unknown-linux-gnu.tar.gz | PPC64LE Linux | checksum |
| ty-riscv64gc-unknown-linux-gnu.tar.gz | RISCV Linux | checksum |
| ty-s390x-unknown-linux-gnu.tar.gz | S390x Linux | checksum |
| ty-x86_64-unknown-linux-gnu.tar.gz | x64 Linux | checksum |
| ty-armv7-unknown-linux-gnueabihf.tar.gz | ARMv7 Linux | [checksum](https://releases.astral.sh/github/ty/releases/download/0.0.50/ty-armv7... |
0.0.49
Release Notes
Released on 2026-06-11.
Bug fixes
- Fix site-package error when multiple versions of Python are installed in system path (#25769)
Diagnostics
- Point at attribute's binding site in `invalid-await diagnostic (#24628)
- Report redefined legacy TypeVars (#25854)
Performance
- Add dedicated TDDs for narrowing constraints (#25834)
- Avoid caching same-file raw signatures (#25761)
- Cache reachability evaluations during inference (#25696)
- Compact retained definition maps (#25737)
- Omit redundant definition inference owner keys (#25837)
Core type checking
- Preserve nominal type of
enum.propertyinstances (#25849) - Restrict length narrowing to types that encode their length (#25840)
- Use peer context for collection literals (#25848)
Contributors
Install ty 0.0.49
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.49/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.49/ty-installer.ps1 | iex"Download ty 0.0.49
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>0.0.48
Release Notes
Released on 2026-06-10.
Performance
- Avoid redundant constraint saturation work (#25786)
Core type checking
- Add support for TypedDict
extra_items(#25591) - Improve
closed=TrueTypedDict precision (#25651) - Require subtyping for transitive constraint pivots (#25778)
- Sync vendored typeshed stubs (#25828). Typeshed diff
Contributors
Install ty 0.0.48
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.48/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.48/ty-installer.ps1 | iex"Download ty 0.0.48
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>0.0.47
Release Notes
Released on 2026-06-10.
Bug fixes
- Avoid panicking on encountering a recursive NamedTuple that references a recursive NewType (#25764)
- Fix out-of-bound panic in notebooks involving suppression comments (#25629)
Core type checking
- Preserve overloads through callable protocol decorators (#25806)
- Sync vendored typeshed stubs (#25779). Typeshed diff
Performance and memory-usage improvements
- Avoid caching specialization-invariant known instances (#25816)
- Avoid resolving overload sets for ordinary functions (#25817)
- Store common definition inference results inline (#25814)
- Use
Box<SystemPath>etc. inFiles(#25554)
Contributors
Install ty 0.0.47
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.47/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.47/ty-installer.ps1 | iex"Download ty 0.0.47
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>0.0.46
Release Notes
Released on 2026-06-08.
Bug fixes
- Avoid crash when hovering over Callable (#25759)
Core type checking
- Support
Callable()in match statement class patterns (#25541) - Improve support for
enum.property(#25681)
Contributors
Install ty 0.0.46
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.46/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.46/ty-installer.ps1 | iex"Download ty 0.0.46
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>0.0.45
Release Notes
Released on 2026-06-08.
Bug fixes
- Avoid treating dynamic class attributes as instance attributes (#25678)
- Fix divergence in recursive inference due to ambiguous overload (#25548)
- Preserve literal promotion for mixed bounds (#25648)
Diagnostics
- Add
missing-type-argumentlint rule (#25617)
Core type checking
- Add support for narrowing on tuple match cases (#25493)
- Check implicit open TypedDict extra items (#25628)
- Create fresh copies of generic callable typevars (#24949)
- Preserve deprecation on replacement functions (#25688)
- Preserve intersection receivers during attribute lookup (#25626)
- Preserve transparent callable decorators (#25030)
Performance
- Avoid AST load for callable description names (#25728)
- Avoid caching absent class decorators and type parameters (#25689)
- Avoid caching atomic type specializations (#25663)
- Avoid caching constant constraint relations (#25656)
- Avoid caching missing implicit attributes (#25649)
- Avoid caching trivial class-header queries (#25692)
- Avoid caching trivial member lookups (#25661)
- Bypass member lookup for module imports (#25723)
- Cache constraint implication checks (#25714)
- Cache upper-bound satisfiability (#25710)
- Compact retained function type signatures (#25669)
- Compact retained use-def bindings (#25682)
- Consolidate retained narrowing constraints (#25660)
- Construct trivial constraint sets directly (#25659)
- Resolve function descriptors directly (#25675)
- Share code-generator classification across specializations (#25701)
- Share parameter lists with
Arc(#25735) - Use same-file expression inference in reachability (#25694)
Contributors
Install ty 0.0.45
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.45/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.45/ty-installer.ps1 | iex"Download ty 0.0.45
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>0.0.44
Release Notes
Released on 2026-06-04.
Bug fixes
- Avoid treating
sys.implementation.versionlikesys.version_info(#25608) - Fix anchor point for override diagnostics (#25621)
LSP server
- Show type alias value on hover (#25381)
Performance
- Add caching for pattern match narrowing (#25613)
- Compact retained definition and expression identities (#25606)
- Reuse expression cache for TypedDict union inference (#25643)
- Upgrade Salsa (#25545)
Core type checking
- Enable narrowing for unions of TypedDict (#25188)
Contributors
Install ty 0.0.44
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.44/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.44/ty-installer.ps1 | iex"Download ty 0.0.44
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>0.0.43
Release Notes
Released on 2026-06-03.
Bug fixes
- Don't inject
Unknownfrom non-callable elements of intersection call (#25538) - Don't needlessly disambiguate the same type alias (#25563)
- Fix variance inference for nested type aliases (#25567)
- Ignore rejected member annotations for synthesized bindings (#25427)
- Normalize dynamic class literals in cycle recovery (#25558)
- Register file roots for first-party search paths (#25522)
- Treat union-bound typevars like unions for
possibly-missing-attribute(#25561)
LSP server
- Suppress importable completions that are already in scope (#25479)
Performance
- Avoid retaining duplicate function signatures (#25609)
- Compact retained definition inference results (#25593)
- Compact retained definition kinds (#25610)
- Compact retained definitions by node (#25498)
- Consolidate AST ID reverse lookup (#25455)
- Consolidate retained use-def definition maps (#25499)
- Omit redundant definitions-by-node entries (#25501)
- Reuse common protocol constraints for TypedDict unions (#25598)
Diagnostics
- Improve error context for not-iterable diagnostics (#24944)
Core type checking
- Detect disjointness due to incompatible generic specializations (#24822)
- Distinguish
typing.Callablefromcollections.abc.Callable(#24954) - Include nested
global/nonlocalbindings in type inference (#25387) - Optional lower/upper bounds in individual constraints (#25435)
- Preserve slice-bound types in subscript inference (#25446)
- Reject
Selfin type aliases (#25529) - Require literal booleans for TypedDict flags (#25594)
- Support narrowing on lengths (#25347)
- Synthesize precise
__len__methods for literals (#25600) - Use callable type context to implicitly specialize generic class (#25471)
- expand type aliases inside type context unions (#25553)
Contributors
Install ty 0.0.43
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.43/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.43/ty-installer.ps1 | iex"Download ty 0.0.43
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>0.0.42
Release Notes
Released on 2026-06-01.
Bug fixes
- Fix narrowing of enum literal unions by member identity (#25520)
- Detect recursive expansion in constraint-set solving (#25442)
Core type checking
- Support tagged-union narrowing for nominal types (#24916)
- Extend
Generatorassignability workaround to Python 3.13+ (#25472) - Sync vendored typeshed stubs (#25514)
Performance
- Avoid redundant work for empty collection context (#25527)
- Deduplicate retained use-def place states (#25450)
- Compact retained semantic maps (#25238)
Contributors
Install ty 0.0.42
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.42/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.42/ty-installer.ps1 | iex"Download ty 0.0.42
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>