winget install --id astral-sh.ty
About ty
An extremely fast Python type checker and language server, written in Rust.
What's new in 0.0.38
Bug fixes - Fix panic in enum literal during cycle recovery (#25237) - Fix panic from lazy NewType base expansion during cycle recovery (#25234) - Fix class-body global lookup before class binding (#25224) - Handle aliased dict fallbacks in TypedDict unions (#25241) - Ignore _generate_next_value_ with custom construction hooks (#25210) LSP server - Fix find references for except handlers (#25231) - Preserve delimiters when folding expressions (#24999) - Use incremental file walk on .gitignore changes (#25183) Core type checking - Add first-class support for enum complements (#24961) - Allow known non-field writes on frozen dataclass subclasses (#25087) - Ignore generic specialization in layout compatibility checks (#25178) - Preserve short-circuit bindings in all condition consumers (#25160) - Support class decorators (#25091) - Support custom _generate_next_value_ methods in enums (#25196) Contributors - @MatthewMckee4 - @MichaReiser - @charliermarsh - @lerebear - @thejchap
Version history
| Version | Updated | Notes |
|---|---|---|
| 0.0.38 | Bug fixes - Fix panic in enum literal during cycle recovery (#25237) - Fix panic from lazy NewType base expansion during cycle recovery (#25234) - Fix class-body global lookup before class binding (#25224) - Handle alias... | |
| 0.0.37 | Unknown | Bug fixes - Avoid unsound not in narrowing (#25161) - Fix async iteration over narrowed typevars (#25155) - Fix panic in double-inference for single starred positional TypedDict (#25176) - Fix panic in disjoint base chec... |
| 0.0.36 | Unknown | Bug fixes - Fix Go To-Definition for self-imported submodules (#25106) - Fix ClassVar[Self] assignment checks for class objects (#24657) - Fix attribute access on Callable-bounded TypeVars (#24793) - Fix panic from Typed... |
| 0.0.35 | Unknown | Bug fixes - Allow ParamSpec specialization through unioned generic classes (#24826) - Fix cross-file find-references for keyword arguments (#25043) - Fix comparison between negative and positive literal integers (#25023)... |
| 0.0.34 | Unknown | Bug fixes - Avoid panic in recursive protocol signature comparisons (#24665) - Avoid panics for syntax error targets in invalid unpacking assignments (#24663) - Fix unbounded type growth in nested-typevar substitutions (... |
| 0.0.33 | Unknown | Breaking 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... |
| 0.0.32 | Unknown | 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) - F... |
| 0.0.31 | Unknown | 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 infere... |
| 0.0.30 | Unknown | 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"... |
| 0.0.29 | Unknown | 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... |
| 0.0.28 | Unknown | 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 -... |
| 0.0.27 | Unknown | 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 n... |
| 0.0.26 | Unknown | 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... |
| 0.0.25 | Unknown | 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 comme... |
| 0.0.24 | Unknown | 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 - Improve semantic to... |
| 0.0.23 | Unknown | 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... |
| 0.0.22 | Unknown | 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.overri... |
| 0.0.21 | Unknown | 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 (#23... |
| 0.0.20 | Unknown | 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... |
| 0.0.19 | Unknown | 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 incorr... |