Repository navigation
Immutable
release. Only release title and notes can be modified.
Release Notes
Released on 2026-11-30.
Bug fixes
- Fix a false positive that depended on which file ty checked first when a property involved in a circular import read an attribute through an alias for
self. (#31065)
Performance improvements
- Speed up parallel, one-shot
ty checkruns with fixes disabled by starting the largest Python files first, so workers spend less time idle at the end of the check. (#31114) - Narrow types faster when the same variable is read repeatedly under the same conditions, especially when narrowing a union. (#31022)
- Resolve overloaded calls with
Anyarguments faster when earlier overloads accept only literal values at the same parameter, as with service names inboto3’sSession.clientoverloads. (#31043) - Check
TypedDict.getcalls with string literal keys faster by skipping overloads that take a different number of arguments. For calls without a default, ty can also skip overloads for other keys when it does not need them for editor completions. (#30868) - Infer repeated comparisons faster when the operator and operand types match by reusing the result of resolving methods such as
__lt__and__gt__. (#31086) - Infer fixed-length tuples faster, including indexing expressions such as
tensor[i, :], when each expression supplies one element and its inferred type can be used directly. (#31082) - Check calls to values typed
AnyorUnknownfaster when they pass arguments without unpacking and require no collection inference orTypedDictkey checks. (#31080) - Check subclass overrides faster by reusing information about base classes across member declarations. (#31079)
- Rule out protocol matches faster when a class lacks a required ordinary method, even if
__getattr__can supply a callable with that name. (#31062) - Look up instance attributes faster across classes that share a metaclass, including ordinary classes that use
type. (#31087) - Check dictionary literals against unions faster by testing other alternatives separately only when the union contains exactly one
TypedDictand a compatible alternative could suppress field diagnostics. (#31045) - Match call arguments to parameters with less overhead by looking ahead for keyword arguments only when unpacking a variable-length iterable into positional arguments. (#31072)
- Reduce allocations when inferring argument types for calls with few arguments or a single candidate signature. (#31038)
- Resolve overloaded methods faster when the final definition rules out
classmethodorstaticmethodbehavior without checking the other definitions. (#31097) - Reduce the cost of checking annotated assignments by testing whether the value is callable only for possible enum members, where
invalid-enum-member-annotationcan apply. (#31074) - Reduce the cost of checking class definitions by checking for enum inheritance for
invalid-generic-enumonly on generic classes. (#31074)
Memory usage improvements
- Use less memory when resolving parameter types inside functions by reusing the signature’s annotations and defaults instead of analyzing unrelated definitions in the surrounding class or module. (#31065)
- Use less memory for imports such as
from package import nameby looking up the name directly on the package, especially when many files import from the same package. (#31071) - Use less memory when checking reads of attributes defined with the built-in
property, including@propertygetters, by resolving common reads directly. (#31095)
Contributors
Install ty 0.0.114
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.114/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.114/ty-installer.ps1 | iex"Download ty 0.0.114
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>