github astral-sh/ty 0.0.114

one hour ago

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 check runs 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 Any arguments faster when earlier overloads accept only literal values at the same parameter, as with service names in boto3’s Session.client overloads. (#31043)
  • Check TypedDict.get calls 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 Any or Unknown faster when they pass arguments without unpacking and require no collection inference or TypedDict key 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 TypedDict and 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 classmethod or staticmethod behavior 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-annotation can apply. (#31074)
  • Reduce the cost of checking class definitions by checking for enum inheritance for invalid-generic-enum only 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 name by 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 @property getters, 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 | sh

Install 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

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-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
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

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/ty

You 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>

Don't miss a new ty release

NewReleases is sending notifications on new releases.