Skip to content

Releases: astral-sh/ty

0.0.27

31 Mar 19:08
Immutable release. Only release title and notes can be modified.
5c9e342

Choose a tag to compare

Release Notes

Released on 2026-03-31.

Bug fixes

  • Fix panic on debug builds when attempting to provide autocomplete suggestions for list[int]<CURSOR>() (#24167)
  • Fix instance-attribute lookup in methods of protocol classes (#24213)
  • Fix nested global and nonlocal lookups through forwarding scopes (#24279)
  • Fix panic on list[Annotated[()]] (#24303)
  • Fix stack overflow on type A = TypeIs[Callable[[], A]] (#24245)
  • Use _cls as the name of the first argument for synthesized collections.namedtuple constructor methods (#24333)

LSP server

  • Fix semantic token classification for properties accessed on instances (#24065)
  • Grey out unused bindings in the editor (#23305)

Core type checking

  • Add bidirectional type context for TypedDict get() defaults (#24231)
  • Add bidirectional type context for TypedDict pop() defaults (#24229)
  • Add support for functional TypedDict (#24174, #24331, #24295)
  • Ban type qualifiers in PEP-695 type aliases (#24242)
  • Enforce Final attribute assignment rules for annotated and augmented writes (#23880)
  • Improve support for Callable type context (#23888)
  • Infer lambda expressions with Callable type context (#22633)
  • Don't incorrectly infer the type of a method as being a singleton type when it's accessed off an instance (#24039)
  • Propagate type context through await expressions (#24256)
  • Resolve union-likes in emitting union attribute errors (#24263)
  • Show the user where the variable was declared as Final when emitting a diagnostic about a Final variable being reassigned (#24194)

Contributors

Install ty 0.0.27

Install prebuilt binaries via shell script

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

Download ty 0.0.27

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

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>

0.0.26

26 Mar 16:28
Immutable release. Only release title and notes can be modified.
9403051

Choose a tag to compare

Release Notes

Released on 2026-03-26.

Bug fixes

  • Prevent "too many cycle iteration" panics in more situations (#24061)
  • Fix false positives and false negatives when unpacking a union of tuples into a function call (#23298)

Core type checking

  • Add support for typing.Concatenate (#23689)
  • Validate the return type of generator functions (#24026)
  • Support dataclass field converters (#23088)
  • Disallow Self in metaclass and static methods (#23231)
  • Improve call inference for keyword-only dict() (#24103)
  • Respect non-explicitly defined dataclass_transform params (#24170)
  • Unconditionally silence diagnostics in unreachable code (#24179)
  • Respect terminal-function-call narrowing in global scope (#23245)

Performance

  • Fix performance regression for narrowing on a larger Literal type(#24185)

Contributors

Install ty 0.0.26

Install prebuilt binaries via shell script

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

Download ty 0.0.26

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

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>

0.0.25

24 Mar 22:33
Immutable release. Only release title and notes can be modified.
d60899a

Choose a tag to compare

Release Notes

Released on 2026-03-24.

Breaking changes

  • Support type:ignore[ty:code] suppressions (#24096)

Bug fixes

  • Avoid eager TypedDict diagnostics in TypedDict | dict unions (#24151)
  • Fix Salsa panic propagation (#24141)
  • Fix folding ranges of comments separated by statements (#24132)
  • Fix loop-header reachability cycles in conditional unpacking (#24006)
  • Fix subtyping of intersections containing NewTypes of unions vs. unions (#24087)
  • Fix untracked reads in Salsa queries that can lead to backdating panics (#24051)
  • Prevent tainted loop bindings in cycle normalization (#24143)
  • Simplify an intersection of N & ~T to Never if B & ~T would simplify to Never, where B is the concrete base type of a NewType N (#24086)

LSP

  • Preserve blank lines between comments and imports in add-import action (#24066)

Type checking

  • Add diagnostic hint for invalid assignments involving invariant generics (#24032)
  • Add precisely-typed overloads for TypedDict update (#24101)
  • Disallow read-only fields in TypedDict updates (#24128)
  • Expand bounded typevars to their upper bounds when evaluating truthiness comparisons between intersections and literal types (#24082)
  • Emit reveal_type diagnostics in unreachable code (#24070)
  • Improve isinstance() reachability analysis (#24077)
  • Improve keyword argument narrowing for nested dictionaries (#24010)
  • Infer yield expression types (#23796)
  • Reduce diagnostic range for invalid-metaclass (#24145)
  • Support narrowing for extended walrus targets (#24129)
  • Unions/intersections of gradual types should be assignable to Never (#24056)

Contributors

Install ty 0.0.25

Install prebuilt binaries via shell script

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

Download ty 0.0.25

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

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>

0.0.24

19 Mar 16:57
Immutable release. Only release title and notes can be modified.
8762330

Choose a tag to compare

Release Notes

Released on 2026-03-19.

Bug fixes

  • Ensure TypedDict subscripts for unknown keys return Unknown (#23926)
  • Fix overflow with recursive TypeIs (#23784)
  • Fix variance of frozen dataclass-transform models (#23931)

LSP server

Core type checking

  • Improve performance and correctness by avoiding inferring intersection types for call arguments as a result of bidirectional inference (#23933)
  • Narrow keyword arguments when unpacking dictionary instances (#23436)
  • Discover /usr/local/lib dist-packages on Debian/Ubuntu (#23797)
  • Sync vendored typeshed stubs (#23963). Typeshed diff

Install ty 0.0.24

Install prebuilt binaries via shell script

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

Download ty 0.0.24

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

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>

0.0.23

13 Mar 12:35
be6e94a

Choose a tag to compare

Release Notes

Released on 2026-03-13.

Bug fixes

  • Fix false-positive diagnostics for PEP-604 union annotations on attribute targets on Python 3.9 when from __future__ import annotations is active (#23915)
  • dataclass_transform: Respect kw_only overwrites in dataclasses (#23930)
  • Fix too-many-cycle panics when inferring loop variables with Literal types (#23875)

Server

Core type checking

  • Split errors for possibly missing submodules into a new possibly-missing-submodule error code (enabled by default), and make possibly-missing-attribute ignored by default (#23918)
  • Improve handling of bidirectional inference when (#23844)
  • Fix inference of conditionally defined properties (#23925)

Improvements to diagnostics

  • Clarify in diagnostics that from __future__ import annotations only stringifies type annotations (#23928)

Performance improvements

  • Avoid duplicated work during multi-inference (#23923)

Contributors

Install ty 0.0.23

Install prebuilt binaries via shell script

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

Download ty 0.0.23

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

0.0.22

12 Mar 17:41
eda1e71

Choose a tag to compare

Release Notes

Released on 2026-03-12.

Bug fixes

  • Fix issue where variables could be inferred as Divergent if they were assigned using tuple unpacking in loops (#23812)
  • Allow error = "all" in a root pyproject.toml file to be overridden using tool.ty.overrides in a subdirectory's pyproject.toml file (#23712)
  • Only unsoundly upcast type[] types to their constructor Callable type during assignability checks, not during redundancy/subtyping checks (#23834, #23901)
  • Fix stack overflow that could occur with certain recursive protocols (#23870)

LSP server

  • Improve syntax highlighting by fixing semantic token classification for generic class members in annotations (#23811)

CLI

  • Add ty explain <RULE> CLI command (#23766)

Core type checking

  • Add validation for type parameters with defaults after TypeVarTuple parameters (#23807)
  • Allow subtypes of LiteralString to be narrowed using equality checks (#23794)
  • Detect invalid partially stringified PEP-604 unions (#23285)
  • Disambiguate duplicate-looking overloaded callables in union display (#23907)
  • Don't promote module-literal types to types.ModuleType (#23786)
  • Improve type context support for __setitem__ dunder calls (#23800)
  • Infer t | {"foo": int} as TD if t is an instance of a TypedDict td with a foo: int key (#23806)
  • Narrow T to T & str rather than str if T is a constrained TypeVar with str as one of its constraints (#23850)
  • Promote None to None | Unknown in invariant contexts (#23790)
  • Reject type[Callable] in type annotations (#23753)
  • Support enum member access through enum instances and members (#23772)
  • Eagerly narrow the type associated with keys of heterogeneous dict literals even when a dict literal appears as a subexpression inside a list or tuple literals (#23569)
  • Ensure that T & ~S is always inferred as a subtype of U during generic inference if T is understood as a subtype of U (#23728)
  • Optimize and improve cycle recovery by preventing "tainted" unions in cycle normalization (#23563)

Installer

  • Prefer downloading releases from Astral's mirror over GitHub (#2980)

Contributors

Install ty 0.0.22

Install prebuilt binaries via shell script

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

Download ty 0.0.22

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

0.0.21

06 Mar 01:58
c1ad9f2

Choose a tag to compare

Release Notes

Released on 2026-03-05.

Bug fixes

  • Avoid stack overflow with recursive typevar (#23652)
  • Fix panic on incomplete except handlers (#23708)
  • Allow unions of different-length iterables in *args unpacking into optional positional parameters (#23124)
  • Don't replace Any attributes with object after isinstance narrowing (#23725)

LSP server

  • Exclude decorators from class/def code folding (#23543)
  • Fix handling of non-Python text documents (#23704)

Configuration

  • Add all selector to ty.json schema (#23721)
  • Fix precedence of all selector in TOML configurations (#23723)
  • Make all selector case-sensitive (#23713)

Type checking

  • Add invalid-enum-member-annotation lint rule (#23648)
  • Add a diagnostic for an unused awaitable (#23650)
  • Add a diagnostic if a TypeVar is used to specialize a ParamSpec, or vice versa (#23738)
  • Add more type-variable default validation (#23639)
  • Add unbound type variable detection in annotations (#23641)
  • Apply narrowing to walrus values (#23687)
  • Do not union Unknown into unannotated container types (#23718)
  • Avoid inferring generics with negative intersections (#23750)
  • More precise types for name and value of an enum (#23683)
  • Better preserve user-provided union order in inferred specializations (#23715)
  • Support narrowing in ternary expressions (#23726)
  • Validate bare ParamSpec usage in type annotations, and support stringified ParamSpecs as the first argument to Callable (#23625)

Contributors

Install ty 0.0.21

Install prebuilt binaries via shell script

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

Download ty 0.0.21

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

0.0.20

02 Mar 15:52
2bd0252

Choose a tag to compare

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

0.0.19

26 Feb 12:14
ae10022

Choose a tag to compare

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

0.0.18

20 Feb 21:52
7516727

Choose a tag to compare

Release Notes

Released on 2026-02-20.

Bug fixes

  • Support classes dynamically created via type(...) with cyclic bases (#22792)
  • Fix incorrect types inferred when unpacking mixed tuples (#23437)
  • Fix stack overflow for self-referential TypeOf in annotations (#23407)
  • Fix several server panics that could occur when computing semantic tokens for the current file (#23403), #23398, #23401)

LSP server

  • Add code folding support (#23393)
  • Add warning message when running ty server interactively (#23416)
  • Exclude test-related symbols from non-first-party packages in auto-import completions (#23252)
  • Fix bug where diagnostics could disappear after opening an external file (#23447)
  • Remove spurious destination for Go-To Definition on variables defined in a loop (#23391)
  • Use the fully qualified name when "baking" an inlay hint into the source code if the scope already contains a variable with the same name as the unqualified name (#23265)
  • Resolve TypeVars in call_signature_details parameter types (#23149)

CLI

  • Add --output-format to ty version (#23387)

Configuration

  • Add replace-imports-with-any option (#23122)
  • Support shellexpand for configuration paths (#23274)

Type checking

  • Add a new diagnostic to detect invalid class patterns in match statements (#22939)
  • Allow Self in ClassVar type annotations (#23362)
  • Consider synthesized methods and ClassVar-qualified declarations when determining whether an abstract method has been overridden in a subclass (#23381)
  • Add a diagnostic when combining Final and ClassVar (#23365)
  • Fix return type of assert_never (#23389)
  • Fix assert_type diagnostic messages (#23342)
  • Ban PEP-613 type alias values from containing type-qualifier special forms (#23444)
  • Infer LiteralString for f"{literal_str_a} {literal_str_b}" (#23346)
  • Infer precise types for bit-shift operations on integer literals (#23301)
  • Make [abstract-method-in-final-class] diagnostics less verbose for classes with many abstract methods (#23379)
  • Improve diagnostics for abstract @final classes (#23376)
  • Only perform literal promotion for implicitly inferred literals (#23107)
  • Parenthesize callable types when they appear in the return annotation of other callable types (#23327)
  • Consider a call to a generic function returning Never to terminate control flow (#23419)
  • Support calls to intersection types (#22469)
  • Validate annotated assignments to attributes on self (#23388)
  • Treat a bytes-literal type as a subtype of Sequence[<constituent integers in the bytestring>] (#23329)
  • Allow a string-literal argument to match against an Iterable parameter in type variable inference. (#23326)
  • Support narrowing from a Callable type returning a TypeGuard type (#23280)

Performance

  • Consider all code paths as being ambiguously reachable in cases with pathologically large control-flow graphs (#23399)

Typeshed

Contributors

Install ty 0.0.18

Install prebuilt binaries via shell script

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

Download ty 0.0.18

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](https://github.com/astral-sh/ty/releases/download/0.0.18/ty-arm...
Read more