Skip to content

Releases: astral-sh/ty

0.0.33

28 Apr 10:47
Immutable release. Only release title and notes can be modified.
c512d84

Choose a tag to compare

Release Notes

Released on 2026-04-28.

Notable changes

  • ty now prefers the declared type of an annotated assignment in more situations (#24802).
    Consider this example:

    from some_library import untyped_function
    
    threshold: int | None = 0
    result: str = untyped_function()

    ty previously favored the inferred type of the right hand side expression when threshold and result were used. This is useful for threshold, as it allows something like threshold += 1 to work without an error: we know that threshold could later become None, but right now, we see that it is an int. However, for result, the inferred type is Unknown. This is not a useful type and it can lead to false negatives. Starting with this release, ty will therefore prefer
    the declared type if the inferred and declared types are mutually assignable. In the above example, threshold will still be inferred as int (or rather Literal[1]), but result will now be inferred as str. If you previously added casts to work around this behavior, you should be able to remove them after upgrading.

Bug fixes

  • Fix reporting of annotation-only locals as unused (#24811)
  • Fix project and workspace selection (#24824)
  • Fix go-to definition for generic classes (#24714)
  • Fix receiver coloring for aliased decorators (#24884)

LSP server

  • Add support for go-to definition in literal enum member inlay hints (#24792)
  • Add support for "baking" keyword argument inlay hints into the source code (#24667)
  • Don't allow inlay hint edits when introducing a non global scope symbol (#24797)
  • Omit semantic highlighting for unresolved symbols (#24718)

Core type checking

  • Support narrowing with aliased conditional expressions (#24302)
  • Model short-circuiting control flow in Boolean expressions (#24458)
  • Handle finally blocks where all try/except blocks are terminal (#24882)
  • Detect invalid ClassVar vs instance-attribute overrides (#24767)
  • Emit diagnostic for invalid uses of Unpack[...] (#24868)
  • Infer lambda parameter types with Callable type context (#24317)
  • Support ** unpacking of TypedDict in dict-literal assignments (#24703)
  • Support Unpack[TypedDict] in **kwargs signatures (#24653)
  • Treat [*xs] as an irrefutable pattern when matching on Sequence (#24787)
  • Improve generics solving for unions in invariant positions (#24698)
  • Improve generics solving for unions when matching against protocols (#24837)

Diagnostics

  • Add error context to invalid-return-type diagnostics, invalid-yield diagnostics, attribute assignment diagnostics (#24770, #24771)
  • Add error context for invalid TypedDict assignments (#24790)
  • Add error context for invalid intersection type assignments (#24772)
  • Improve TypedDict to dict assignment error diagnostics (#24768)
  • Add contextual secondary annotations in more places (#24696)
  • Include full type in invalid-key diagnostics for unions of TypedDicts (#24693)
  • Emit more specific diagnostics for "possibly unbound" errors from context manager dunder methods invoked on a union. (#24662)
  • Remove duplicate invalid-type-form diagnostics for PEP-613 type alias values (#24760)
  • Improve diagnostics for implicit calls to a possibly unbound unary operator (#24816)
  • Improve diagnostics for possibly-unbound errors from implicit dunder calls on unions (#24676)

Performance

  • Optimize signature checking based on number of arguments (#24674)
  • Defer union of parameter types (#24756)
  • Skip checks for gradual vararg calls (#24748)

Other changes

  • Fix notifications about watched changes for entities outside any workspace (#24775)

Contributors

Install ty 0.0.33

Install prebuilt binaries via shell script

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

Download ty 0.0.33

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 MU...
Read more

0.0.32

20 Apr 19:30
Immutable release. Only release title and notes can be modified.
4d1e1fc

Choose a tag to compare

Release Notes

Released on 2026-04-20.

Bug fixes

  • Fix panic when __get__ uses Concatenate self-type and wraps a __call__ (#24692)
  • Avoid panicking on overloaded Callable type context (#24661)
  • Expand class bases in per-base lint checks (#24695, #24699)
  • Fix stack overflow for binary operator inference involving recursive types (#24551)

LSP server

  • Dim out unreachable code in IDEs (#24580)
  • Do not suggest argument completion when typing the value of a keyword argument (#24669)
  • Retrieve the docstring from the overload implementation if an @overload-decorated function has no docstring (#23920)

Core type checking

  • Allow if statements in TypedDict bodies (#24702)
  • Disallow @disjoint_base on TypedDicts and Protocols (#24671)
  • Do not consider a subclass of a @dataclass_transform-decorated class to have dataclass-like semantics if it has type in its MRO (#24679)
  • Reject using properties with Never setters or deleters (#24510)
  • Sync vendored typeshed stubs (#24646). Typeshed diff

Diagnostics

  • Show error context for assignability diagnostics (#24309)
  • Use partially qualified names when reporting diagnostics regarding bad calls to methods (#24560)
  • Reduce source code context window to zero (#24689)
  • Merge same-file annotations if there is only a single line separating them (#24694)

Performance

  • Memoize binary operator return types (#24700)
  • Gate protocol compatibility on member count (#24684)

Contributors

Install ty 0.0.32

Install prebuilt binaries via shell script

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

Download ty 0.0.32

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

15 Apr 15:49
Immutable release. Only release title and notes can be modified.
daaa404

Choose a tag to compare

Release Notes

Released on 2026-04-15.

Bug fixes

  • Avoid panic from double inference for namedtuple(typename=T, field_names=x, **{}) (#24641)
  • Avoid panic from double inference with missing functional Enum(...) names (#24638)
  • Avoid panic from double inference with functional Enum(value=...) (#24639)
  • Fix cases where invalid-key fix doesn't converge, and override-of-final-method produces invalid syntax (#24649)
  • Fix unnecessary ty:ignore comments inserted by --add-ignore for diagnostics starting on the same line (#24651)

CLI

  • Add --fix mode to enable auto-fix for diagnostics (#24097)

Performance

  • Avoid excessive memory usage for dataclasses with many fields (#24620)

Core type checking

  • Check inherited NamedTuple field conflicts (#24542)
  • Error when duplicate keywords are provided to TypedDict constructors (#24449)
  • Respect mixed positional and keyword arguments in TypedDict constructor (#24448)
  • Respect subclass shadowing for inherited NamedTuple fields (#24640)
  • Skip EnumMeta.__call__ for enum constructor signatures (#24513)

Contributors

Install ty 0.0.31

Install prebuilt binaries via shell script

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

Download ty 0.0.31

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

14 Apr 13:54
Immutable release. Only release title and notes can be modified.
12e86b5

Choose a tag to compare

Release Notes

Released on 2026-04-13.

As of v0.0.30, ty no longer unions Unknown into most inferred types of unannotated attributes. For example:

class Foo:
    def __init__(self) -> None:
        self.value = 1

reveal_type(Foo().value)  # revealed: int
Foo().value = "x"  # error: [invalid-assignment]

In previous versions, reveal_type(Foo().value) would have included Unknown, so the assignment to "x" would not have been flagged. Since this can affect inferred attribute types throughout a codebase, upgrading may lead to both new and resolved diagnostics. Initializers of None and other non-literal singleton types remain exceptions. See #24531 for details.

Bug fixes

  • Disallow bare ParamSpec in Concatenate prefixes (#24474)
  • Ensure '/' parameter appears before '*' when rendering Callable types (#24497)
  • Ensure nested conditional blocks inherit TYPE_CHECKING state from outer blocks (#24470)
  • Fix bad diagnostic range for incorrect implicit __init_subclass__ calls (#24541)
  • Fix incorrect assignability of type[T] to a metaclass (#24515)
  • Fix stack overflows from recursive types (#24413)
  • Server: fix signature help for ParamSpec-specialized class calls (#24399)
  • Use TypedDict field types as type context to inform the inference of arguments passed to TypedDict constructors (#24422)

LSP server

  • Adjust semantic tokens implementation to ensure that type alias values have "type form" syntax highlighting in IDEs (#24478)
  • Completions: rank symbols from typing and collections higher than third party re-exports (#23643)
  • Ignore unsupported editor-selected Python versions (#24498)
  • Improve TypedDict constructor support in the LSP by synthesizing __init__ (#24476, #24522, #24535)
  • Return all attribute definitions for goto definition, rather than just the last definition in the given scope (#24332)
  • Show info subdiagnostics in LSP diagnostic messages (#24328)
  • Use the context of the kind of object a parameter is expected to receive to inform syntax highlighting of arguments passed to call expressions (#23949)

Diagnostics

  • Hide "Rule xyz is enabled"-style hints unless verbose mode was specified (#24469)
  • Improve consistency of pedantic lints complaining about badly named types (#24575)
  • Point to the first reachable declaration, rather than the first declaration, in declaration-based diagnostics (#24564)

Core type checking

  • Add support for functional Enum(...) syntax (#23602, #24570, #24571)
  • Allow Final variable assignments in __post_init__ (#24529)
  • Allow partially stringified type[...] annotations, e.g. type["MyClass"] (#24518)
  • Emit a diagnostic when attempting to inherit from a class with __init_subclass__ = None (#24543)
  • Fix TypeGuard and TypeIs narrowing for unbound method calls (#24612)
  • Fix assignability of intersections with bounded TypeVars (#24502)
  • Fix excess subscript argument inference for non-generic types so that list[int][0] leads to 1 diagnostic, rather than 2 (#24354)
  • Inherit dataclass_transform metadata from metaclass bases (#24615)
  • Lazily evaluate declaration reachability in field and enum filters (#24451)
  • Normalize explicit None accessors in manual property construction (#24492)
  • Reject deleting Final attributes (#24508)
  • Respect non-required keys in TypedDict unpacking (#24446)
  • Respect property deleters in attribute deletion checks (#24500)
  • Stop special-casing str constructor (#24514)
  • Stop unioning Unknown into types of un-annotated attributes (#24531)
  • Support super() in metaclass methods (#24483)
  • Tighten up a few edge cases in Concatenate type-expression parsing (#24172)
  • Use basic blocks for determining if a node is in an if TYPE_CHECKING block (#24394)

Contributors

Install ty 0.0.30

Install prebuilt binaries via shell script

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

Download ty 0.0.30

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

0.0.29

05 Apr 15:02
Immutable release. Only release title and notes can be modified.
438a78d

Choose a tag to compare

Release Notes

Released on 2026-04-05.

Bug fixes

  • Avoid special-casing for dataclasses.field if it's not in field_specifiers (#24397)
  • Reject unsupported environment.python-version values in configuration files (#24402)
  • Respect supported lower bounds from requires-python (#24401)

Core type checking

  • Add support for types.new_class (#23144)
  • Fix PEP 695 type aliases in with statement (#24395)
  • Respect __new__ and metaclass __call__ return types (#24357)
  • Treat enum attributes with type annotations as members (#23776)

Contributors

Install ty 0.0.29

Install prebuilt binaries via shell script

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

Download ty 0.0.29

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

02 Apr 21:35
Immutable release. Only release title and notes can be modified.
927aad2

Choose a tag to compare

Release Notes

Released on 2026-04-02.

Bug fixes

  • Mark loop header assignments as used to avoid false positives in "unused variable" diagnostics (#24336)

LSP server

  • Show constructor signature of classes when hovering over them (#24257)

Core type checking

  • Avoid emitting cascading diagnostics when parsing invalid type expressions (#24326)
  • Handle most "deep" mutual TypeVar constraints (#24079)
  • Improve consistency and quality of diagnostics relating to invalid type forms (#24325)
  • Improve robustness of various type-qualifier-related checks (#24251)
  • Infer the extra_items keyword argument to class-based TypedDicts as an annotation expression (#24362)
  • Use bidirectional inference to fix false positives on operations such as x: list[int | None] = [None] * 2 (#24197)
  • Sync vendored typeshed stubs (#24340). Typeshed diff
  • Tighten up validation of subscripts and attributes in type expressions (#24329)
  • Use infer_type_expression for parsing parameter annotations and return-type annotations (#24353)
  • Use infer_type_expression for validating PEP-613 type aliases (#24370)
  • Validate TypedDict fields when subclassing (#24338)
  • Validate type qualifiers in functional TypedDict fields and the extra_items keyword to functional TypedDicts (#24360)
  • Improve diagnostics for invalid functional TypedDicts (#24345)

Contributors

Install ty 0.0.28

Install prebuilt binaries via shell script

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

Download ty 0.0.28

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