pypi ty 0.0.112

26 minutes ago

Release Notes

Released on 2026-11-26.

Bug fixes

  • Fix a crash when pressing Ctrl+C just after saving a watched file. ty check --watch now exits with the usual interrupt status 130. (#29976)

Performance improvements

  • Check assignments faster by looking up type annotations and imported Final qualifiers together. (#30797)
  • Simplify unions of fixed-length tuples faster when a pair of elements at any matching position contains disjoint literals or distinct class objects, as in Django’s registry for arithmetic expressions. (#30940)
  • Speed up control flow analysis for type narrowing and reachability, especially in files with large wildcard imports such as from OpenGL.GL import *. (#30790)
  • Infer types faster for collections of functions such as Jinja’s filter registry. When each function has a single standard signature, ty can rule out a match if required parameters at the same position accept different keyword names or if one function requires more positional arguments than the other accepts. (#30858)
  • Infer type arguments faster, including element types for list literals. ty uses a single lower bound directly and removes duplicate types after selecting the bounds relevant to inference or validation. (#30786)
  • Speed up checks of modules and functions without Final declarations by skipping the search for Final names that never receive a value. (#30946)

Core type checking

  • Use the input type of an attrs @field_name.converter method when checking generated constructor arguments and field assignments. Reading the field gives its declared type. If several converters are registered, the first one determines the accepted input type. (#30959)
  • Recognize __attrs_attrs__ as a tuple of field metadata on attrs classes and instances. ty also recognizes the attribute after attrs.has narrows a class to type[AttrsInstance]. (#30958)
  • Report invalid-argument-type when attrs.fields or attrs.asdict receives an argument that lacks the __attrs_attrs__ member required by the AttrsInstance protocol. (#30958)

Contributors

Install ty 0.0.112

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.112/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.112/ty-installer.ps1 | iex"

Download ty 0.0.112

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.