pypi ty 0.0.19

4 hours ago

Release Notes

Released on 2026-02-26.

Bug fixes

  • Fix panic in diagnostic rendering when attempting to render a code frame pointing to leading whitespace (#23458)
  • Fix panics and incorrect inference stemming from incorrectly considering overloads in another file as being associated with a function in the file being checked (#21977)
  • Fix panic when attempting to narrow the type of a dictionary key that was assigned using a multi-target assignment, e.g. x = y = {"a": 1} (#23523)
  • Fix infinite hang on mutually recursive TypeAliasType definitions (#23397)

LSP server

  • Fix inlay hints for starred unpacking targets (#23454)

Core type checking

  • Fix assignability, subtyping and equivalence checks relating to typing.Generator prior to Python 3.13 (#23386)
  • Understand that a scope's control flow terminates after await foo() if foo returns typing.Awaitable[typing.Never] or similar (#23479)
  • Implement stricter handling of calls to instances of type[T] types (#23472)
  • Support basic type narrowing for case {...}: patterns in match statements (#23462)
  • Fix bugs that could manifest in incorrect overload evaluation, false-positive complaints regarding assert_type calls or false-positive redundant-cast diagnostics by reimplementing the equivalence type relation as mutual subtyping of top and bottom materializations (#23428)
  • Fix equality and __contains__ narrowing with PEP-695 type aliases (#23545)
  • Support _value_ annotations on enum classes (#22228)

Improvements to diagnostics

  • Improve diagnostics when attempting to specialize non-generic types (#23516)
  • Render subdiagnostics when --output-format=github is specified (#23455)

Performance

  • Add a cached method for calculating the intersection of two types (#23547)
  • Add a cached method for calculating the union of two types (#23565)
  • Reduce the threshold above which Literal types in unions are upcasted to nominal-instance types in situations where the union type is recursively defined (#23521)
  • Control flow: isolate the calculation of "loop header reachability" in a dedicated, cached function (#23520)

Contributors

Install ty 0.0.19

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.19/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.19/ty-installer.ps1 | iex"

Download ty 0.0.19

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

Don't miss a new ty release

NewReleases is sending notifications on new releases.