Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: astral-sh/ty

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

0.0.17

13 Feb 13:28
8cec857

Choose a tag to compare

Release Notes

Released on 2026-02-13.

Bug fixes

  • Avoid Literal promotion for constrained TypeVars with Literal bounds (#23209)
  • Fix false positives in TypeVar shadowing checks (#23222)

Core type checking

  • Support generic protocols (#21902)
  • Perform control-flow analysis in loops (#22794)
  • Support typing.Self in attribute annotations (#23108)
  • Support type narrowing in situations with calls to NoReturn functions (#23109)
  • Support type narrowing and reachability analysis based on os.name checks (#23230)
  • Detect overrides of Final class variables in subclasses (#23180)
  • Fix bound method access on None (#23246)
  • Fix method calls on subclasses of Any (#23248)
  • Disallow type variables within PEP-695 type variable bounds and constraints (#22982)
  • Emit error for attribute access on union where some elements lack the attribute (#23042)
  • Emit error for invalid typevar defaults (#23194)
  • Improve display of ParamSpecs in some situations (#23211)

LSP server

  • Add hover and go-to-declaration support for subscript literals (#22837)
  • Assign lower completion ranking to deprecated names in auto import (#23188)
  • Improve spans of references to submodules imported in an __init__.py (#21795)
  • Include conditional symbols (like datetime.UTC) in auto-import in more cases (#23249)
  • Support auto-import for symbols in inlay hints (#22111)
  • Include overload declarations in find-references (#23215)

Performance

  • Avoid UnionBuilder overhead when creating a new union from the filtered elements of an existing union (#22352)

Other changes

  • Allow discovering dependencies in system Python environments (#22994)
  • Apply workspace settings to virtual files (#23228)
  • Add support for --output-format=junit (#22125)
  • Use a smaller diagnostic range for inconsistent-mro diagnostics (#23213)

Contributors

Install ty 0.0.17

Install prebuilt binaries via shell script

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

Download ty 0.0.17

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

10 Feb 20:25
e96ea4c

Choose a tag to compare

Release Notes

Released on 2026-02-10.

Bug fixes

  • Allow stringified argument in PEP-613 alias to Optional (#23200)
  • Fix fuzzer panic on slice expression in unclosed comprehension (#23146)
  • Fix combinatorial explosion due to fixed-length tuple expansion in overload matching (#23190)
  • Respect @no_type_check when combined with other decorators (#23177)
  • Fix diagnostic location for an incorrect sub-call to a specialized ParamSpec (#23036)

LSP server

  • Assign lower completions ranking to deprecated functions and classes (#23089)
  • Change goto-def for class constructors to always go to class definition (#23071)
  • Ensure diagnostic mode is consistent across projects inside the LSP server (#23121)
  • Don't include the class Foo in autocomplete suggestions when the user is typing out Foo's bases (#23141)
  • Fix parameter references across files via keyword args (#23012)
  • Fix wrong inlay hints for overloaded function arguments (#23179)
  • Support diagnostics in newly created files inside neovim (#23095)
  • Exclude already-included classes when providing completion suggestions for class bases (#23085)

CLI

  • Add support for TY_OUTPUT_FORMAT environment variable (#23123)
  • Fall back to python3 found in $PATH if no environment is found (#22843)

Type checking

  • Add inconsistent-mro autofix to move Generic[] to the end of the bases list (#22998)
  • Add precise return-type inference for struct.unpack (#22562, #23130)
  • Disallow TypeVars within ClassVars (#23184)
  • Emit diagnostic on unbound call to abstract @classmethod or @staticmethod (#23182)
  • Fix false-positive diagnostics when providing the total= keyword to TypedDict classes that had PEP-695 type parameters (#23114)
  • Narrow both left- and right-hand operands where possible (#23084)
  • Narrow chained operators (#23093)
  • Narrow equality subscripts on either operand (#23104)
  • Recognize __dataclass_transform__ to support SQLModel (#23070)
  • Relax the attribute narrowing condition to support deeper-nested attribute type narrowing (#22440)
  • Support constrained TypeVar compatibility across function boundaries (#23103)
  • Support comparison methods (__gt__, etc.) where a parameter is annotated with a Literal type (#23100)
  • Support partially specialized type context (#22748)
  • Use type context when inferring constructor argument types (#23139)
  • Validate TypedDict constructor calls for generic aliases and type[...] targets (#23113)

Performance

  • Conservative narrowing places optimization (#22734)

Contributors

Install ty 0.0.16

Install prebuilt binaries via shell script

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

Download ty 0.0.16

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

05 Feb 01:07
eb43dff

Choose a tag to compare

Release Notes

Released on 2026-02-04.

Bug fixes

  • Add support for resolving imports of packages installed into Debian/Ubuntu dist-packages directories (#22466)
  • Avoid not-iterable false positives when iterating over an instance of an intersection type with only negated elements (#22089)
  • Fix support for stringized annotations in very large files (#22913)
  • Don't emit Liskov diagnostics for methods with mangled names (#23062)
  • Enforce that a Final symbol cannot be reassigned even after a conditional binding (#22986)
  • Fix TypedDict construction from existing TypedDict values (#22904)
  • Fix Self resolution for classes nested within methods (#22964)
  • Fix bidirectional inference with PEP 695 union type aliases (#22988)
  • Fix edge-case bugs when narrowing tagged unions in match statements (#22870)
  • Fix false-positive diagnostics when iterating over an instance of an intersection that includes a TypeVar of which the upper bound is a union where the union includes a non-iterable type (#22117)
  • Fix lookup of __contains__ to respect descriptors (#23056)
  • Fix narrowing of nonlocal variables with conditional assignments (#22966)
  • Fix several bugs that could affect NewTypes of NewTypes of float (#22997)
  • Fix several type narrowing bugs involving PEP-695 type aliases (#22894)
  • Fix spurious query cycles in decorated functions with parameter defaults, for improved performance and improved determinism (#23014)
  • Fix unary and comparison operators for TypeVars with union bounds (#22925)
  • Understand functions as method descriptors even if they are decorated with a decorator annotated as returning a PEP-695 alias to a Callable type (#22902)
  • dataclass_transform: Fix visibility of field specifiers when models are nested inside methods (#23069)

LSP server

  • Fix hover showing Unknown for bare Final instance attributes (#23003)
  • Improve support for goto-type, goto-declaration, hover, and highlighting of string annotations (#22878)
  • Include setters and deleters when renaming properties (#22999)
  • Show type qualifiers like Final in on-hover hints (#23005)

Configuration

  • Add new unused-type-ignore-comment rule (#22790)
  • Add a mechanism to ignore/warn/select all rules (#22832)
  • Support multiple workspace folders in a single ty LSP server instance (#22953)
  • Only add ./src as a search path if ./src/__init__.py(i) does not exist (#22851)

Type checking

  • Add a diagnostic detecting if a variable is declared as Final but never has any bindings (#23001)
  • Add a diagnostic detecting overridden comparison dunder methods on order=True dataclasses (#22689)
  • Add a hint to invalid-argument-type and invalid-assignment diagnostics if a variable is annotated with a type from the numbers module (#22931, #22938)
  • Add diagnostic hint on unresolved-reference to suggest using "list" instead of "List" (#22827)
  • Add new diagnostic for invalid dataclass field orders (#19825)
  • Allow a subclass method with a positional-only parameter to override a superclass method without that parameter if the parameter in the subclass method has a default value (#23037)
  • Allow self-referential imports outside the global scope (#22963)
  • Ban ... in odd places inside tuple specializations (#22889)
  • Ban Required, NotRequired and ReadOnly in parameter annotations (#22888)
  • Ban legacy TypeVar bounds or constraints from containing type variables (#22949)
  • Ban multiple unpacked variadic tuples in a tuple specialization (#22884)
  • Detect generic Callables in the return type of function signatures (#22954)
  • Detect invalid isinstance() and issubclass() calls against TypedDict classes (#22887)
  • Detect invalid issubclass() calls against Protocol classes with non-method members (#22896)
  • Detect invalid attempts to subclass Protocol[] and Generic[] simultaneously (#22948)
  • Emit a diagnostic on incorrect applications of the legacy convention for specifying positional-only parameters (#22943)
  • Emit an error if a TypeVarTuple is used to subscript Generic or Protocol without being unpacked (#22952)
  • Fallback to metaclass __getattr__ or __getattribute__ when looking up attributes on class objects (#22985)
  • Fix a bug where an overridden type in a dataclass subclass would not be respected if the dataclass subclass field had a default value but the superclass field did not (#22965)
  • Improve bidirectional type inference involving PEP-695 type aliases (#22989)
  • Improve detection of invalid NewTypes with generic bases (#22961)
  • Improve reachability analysis when evaluating the truthiness of expressions that involve variables that may not be bound in all code paths (#22971)
  • Improve the error message if ** is used with a non-mapping in the context of a call to an overloaded function (#22921)
  • Infer ParamSpec from class constructors for callable protocols (#22853)
  • Move the location of some invalid-overload diagnostics (#22933)
  • Point to an overload with an invalid @final decorator when emitting invalid-overload errors for invalid @final decorators (#22893)
  • Avoid false positives when iterating over an instance of an intersection with only negated elements by preserving "pure negation" types in descriptor lookups (#22907)
  • Promote Literal types when inferring elements for very large unannotated tuples, for improved performance (#22841)
  • Recognize functions with stub bodies in Protocol classes as implicitly abstract (#22838)
  • Reduce false positives involving heterogeneous dicts by tracking dictionary literal keys as individual places (#22882)
  • Reduce false positives when subscripting classes generic over TypeVarTuples (#22950)
  • Remove special handling for Any() in match class patterns (#23011)
  • Support type[None] in type expressions (#22892)
  • Support legacy namespace packages declared using pkg_resources.declare_namespace (#22987)
  • Sync vendored typeshed stubs (#23006), Typeshed diff
  • Validate signatures of dataclass __post_init__ methods (#22730)

Contributors

Read more

0.0.14

27 Jan 00:58
16597f5

Choose a tag to compare

Release Notes

Released on 2026-01-26.

Bug fixes

  • Consider keyword arguments when unpacking a variadic argument (#22796)
  • Fix binary operator false-positive for constrained TypeVars (#22782)
  • Fix docstring rendering for literal blocks after doctests (#22676)
  • Fix false-positive unsupported-operator for "symmetric" TypeVars (#22756)
  • Fix panic when overriding a final method using an assignment (#22831)
  • Fix unary operator false-positive for constrained TypeVars (#22783)
  • Fix generic functions with a generic (ParamSpec) decorator (#22544)
  • Fix memo.changed_at assertion panics (#22498)

LSP server

  • Look up attributes on metaclasses for Go to Definition (#22758)
  • Suppress type inlay hints for leading-underscore assignments (#22855)

Configuration

  • Add allowed-unresolved-imports setting (#22800)

Other changes

  • Add assert-type-unspellable-subtype diagnostic, for failed assert_type() where the actual type is a subtype of the named type that can't be spelled in a type expression (#22815)
  • Add a new empty-body return code for functions with stub bodies that have non-None return annotations (#22846)
  • Add diagnostic disambiguation for different type aliases with the same name (#22852)
  • Add support for dict literals and dict() calls as default values for parameters with TypedDict types (#22161)
  • Add support for subscripts on intersections (#22654)
  • Avoid duplicate syntax errors for await outside functions (#22826)
  • Emit an error if the same type parameter appears more than once in a Generic[] subscript (#22738)
  • Emit diagnostic for unimplemented abstract method on @Final class (#22753)
  • Fix GitLab Code Quality output format for empty diagnostics (#22833)
  • Fix assignment in decorated method causing Unknown fallback (#22778)
  • Fix false negative when using a non-runtime-checkable protocol in a match class pattern (#22836)
  • Improve completion rankings for raise-from/except contexts (#22775)
  • Improve invalid assignment diagnostics with type context (#22643)
  • Improve support for kwarg splats in dictionary literals (#22781)
  • Infer TypedDict types with >=1 required key as being always truthy (#22808)
  • Point to an overload with an invalid @final decoator when emitting invalid-overload errors for invalid @final decorators (#22812)
  • Require both *args and **kwargs when calling a ParamSpec callable (#22820)
  • Stricter validation of TypedDict definitions (#22811)
  • Support recursive and stringified annotations in functional typing.NamedTuples (#22718)
  • Support solving generics involving PEP 695 type aliases (#22678)
  • Use a more lenient fallback type for failed namedtuple() and NamedTuple calls (#22765)
  • Use type context from augmented assignment dunder calls (#22540)
  • Check that starred arguments in function calls are iterable (#22805)

Contributors

Install ty 0.0.14

Install prebuilt binaries via shell script

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

Download ty 0.0.14

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

0.0.13

21 Jan 13:22
fc1478b

Choose a tag to compare

Release Notes

Released on 2026-01-21.

Bug fixes

  • Fix --force-exclude when excluding entire directories (#22595)
  • Fix missing syntax highlighting for aliased import names (#22675)
  • Highlight interpolated-parts in t-strings (#22674)
  • Fix the inferred MRO of functional namedtuple classes (#22722)
  • Make special cases for subscript inference exhaustive, ensuring that the special casing for tuple subscripts is applied when a union of tuples or an alias to a tuple type is subscripted (#22035)

LSP server

  • Improve completion suggestions inside class definitions (#22571)
  • Improve performance of completions (#22630)
  • Remove completion suggestions for redundant re-exports that share the same top-most module (#22581)

Core type checking

  • Add basic support for overloads in ParamSpec (#21946)
  • Allow ... as a default value for any parameter if the function is in an if TYPE_CHECKING block (#22624)
  • Allow if type(x) is Y narrowing for types other than class-literal types (#22729)
  • Avoid overload errors when detecting dataclass-on-tuple (#22687)
  • Avoid reporting overload errors for successful union variants (#22688)
  • Ban NewTypes with generic bases (#22653)
  • Fix PEP 695 type aliases not expanding in overload resolution (#22589)
  • Fix the return type for synthesized NamedTuple.__new__ methods (#22625)
  • Emit diagnostics for NamedTuple, TypedDict, Enum or Protocol classes decorated with @dataclass (#22672)
  • Emit invalid-type-form diagnostics for stringified annotations where the quoted expression is invalid (#22752)
  • Infer the implicit type of cls in __new__ methods (#22584)
  • Make ModuleType and object attributes available on namespace packages (#22606)
  • Make NamedTuple(...) and namedtuple(...) calls stricter (#22601)
  • Narrow on bool and byte subscripts (#22684)
  • Narrow on negative subscript indexing (#22682)
  • Override __file__ to str when applicable on imported modules (#22333)
  • Add bidirectional inference for comprehensions (#22564)
  • Recognize string-literal types as subtypes of Sequence[Literal[chars]] (#22415)
  • Add right-hand-side narrowing for if Foo is type(x) expressions (#22608)
  • Add simple syntactic validation for the right-hand side of PEP-613 type aliases (#22652)
  • Add support for passing typename and field_names by keyword argument to collections.namedtuple() calls (#22660)
  • Add support for starred unpacking in class bases (#22591)
  • Validate constructor arguments when a class is used as a decorator (#22377)
  • Validate field names for typing.NamedTuple(...) (#22599)
  • Add diagnostic on overridden __setattr__ and __delattr__ in frozen dataclasses (#21430)
  • Fix unary operators on NewTypes of float or complex (#22605)

Configuration

  • Support overriding respect-type-ignore-comments (#22615)

Diagnostics

  • Don't add a subdiagnostic pointing to the TypeVar definition if the TypeVar is Self (#22646)
  • Show final search path instead of "and 1 more paths" (#22776)
  • Group type[] elements together when displaying union types (#22592)

Performance

  • Cache ClassType::nearest_disjoint_base (#22065)

Other changes

Contributors

Install ty 0.0.13

Install prebuilt binaries via shell script

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

Download ty 0.0.13

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

0.0.12

14 Jan 22:31
4b74e4d

Choose a tag to compare

Release Notes

Released on 2026-01-14.

Bug fixes

  • Avoid panic that could occur when casting an object to a TypedDict or union of TypedDicts (#22509)
  • Fix incorrect narrowing for if type(x) == y (#22531)
  • Fix stack overflow with recursive type aliases containing tuple types (#22543)
  • functools.total_ordering: ensure the signatures of generated methods reflect the signature of the user-provided method (#22496)
  • Support dataclass_transform as a function call (#22378)
  • Use the top materialization of classes for if type(x) is y narrowing. For example, if type(x) is tuple will cause the type of x to be intersected with tuple[object, ...] rather than tuple[Unknown, ...]. (#22553)
  • Avoid emitting Liskov violations with respect to a grandparent class if such violations could not be fixed without introducing Liskov violations with respect to a parent class (#22484)
  • Fix interaction between classmethod, contextmanager, and Self (#22407)
  • Check contravariant type variable bounds contravariantly in specialization inference (#22488)
  • Fix false positive for bounded type parameters with NewType (#22542)

Type checking

  • Add support for dynamic type() classes (#22291, #22499, #22537, #22480)
  • Add support for functional namedtuple creation (#22327, #22573, #22575, #22574)
  • Add a diagnostic for non-decorator uses of final (#22555)
  • Add diagnostic to catch generic enums (#22482)
  • Add diagnostics for __init_subclass__ argument mismatch (#22185)
  • Add diagnostics to validate TypeIs and TypeGuard definitions (#22300)
  • Apply type narrowing to walrus targets (#22369)
  • Detect invalid @total_ordering applications in non-decorator contexts (#22486)
  • Fix @Todo type for starred expressions (#22503)
  • Improve disambiguation of types in diagnostics (#22547)
  • Include type parameters in the display for generic Callable types (#22435)
  • Infer type[Unknown] for calls to type() when overload evaluation is ambiguous (#22569)
  • Support assignment to unions of TypedDicts (#22294)
  • Use the key and value parameter types as type context for __setitem__ dunder calls (#22148)
  • Narrow the right-hand side of ==, !=, is and is not conditions when the left-hand side is not narrowable (#22511)

LSP server

  • Fix __file__ type in completions to show str instead of str | None when the inferred type is str (#22510)
  • Improve rendering of ReST directives in docstrings (#22512)

Contributors

Install ty 0.0.12

Install prebuilt binaries via shell script

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

Download ty 0.0.12

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

09 Jan 21:07
830cb9c

Choose a tag to compare

Release Notes

Released on 2026-01-09.

Bug fixes

  • Fix super() with TypeVar-annotated self and cls parameter (#22208)
  • Only consider fully static pivots when deriving transitive constraints (#22444)

LSP server

  • Don't show diagnostics for excluded files (#22455)
  • Fix goto definition for relative imports in third-party files (#22457)
  • Improve completion ranking based on origin and exact match (#22460)
  • Rank top-level module symbols above most other symbols (#22465)

Configuration

  • Enable unused-ignore-comment by default (#22474)

Performance

  • Improve UnionBuilder performance by changing Type::is_subtype_of calls to Type::is_redundant_with (#22337)
  • Optimize union building for unions with many enum-literal members (#22363)-

Other changes

  • Declare support for Python 3.14 (#2407)
  • Remove dark-mode handling from PyPI-uploaded README (#2422)

Contributors

Install ty 0.0.11

Install prebuilt binaries via shell script

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

Download ty 0.0.11

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