github astral-sh/ty 0.0.20

5 hours ago

Release Notes

Released on 2026-03-02.

Bug fixes

  • Disallow negative narrowing for isinstance() or issubclass() checks involving type[] types (#23598)
  • Fix binary operations between an instance of a NewType of float and an instance of Any/Unknown (#23620)
  • Fix bug where ty would think that a Callable with a variadic positional parameter could be a subtype of a Callable with a positional-or-keyword parameter (#23610)
  • Fix inference of t.__mro__ if t is an instance of type[Any] (#23632)
  • Fix overloaded callable assignability for unary Callable targets (#23277)
  • Limit recursion depth when displaying self-referential function types (#23647)
  • Ensure that python -m ty works even when ty was installed into an ephemeral virtual environment (#2852)

LSP server

  • Add support for the LSP protocol's "type hierarchy" feature (#23566)

Type checking

  • Add more ParamSpec validation for P.args and P.kwargs (#23640)
  • Ban nested Required/NotRequired, and ban them both outside of TypedDict fields (#23627)
  • Detect inconsistent generic base class specializations that appear in the same MRO (#23615)
  • Detect invalid uses of @final on non-methods (#23604)
  • Add partial support and validation for Unpack when used with tuple types (#23651)
  • Recurse into tuples and nested tuples when applying special-cased validation of arguments passed to isinstance() and issubclass() (#23607)
  • Reject ellipsis literals in odd places in type/annotation expressions (#23611)
  • Reject functions with PEP-695 type parameters that shadow type parameters from enclosing scopes (#23619)
  • Reject generic metaclasses parameterized by type variables (#23628)
  • Treat dataclass_transform dataclasses as neither frozen nor non-frozen (#23366)
  • Validate that type variable defaults don't reference later type parameters or type parameters out of scope (#23623)

Typeshed

Contributors

Install ty 0.0.20

Install prebuilt binaries via shell script

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

Download ty 0.0.20

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.