NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #616 most downloaded on PyPI
An extremely fast Python type checker, written in Rust.
Last release 2 days ago
24 Sep 2026
Ships on a steady schedule
a new release about every 9 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
1 years old
125 releases · first in 2025
One column per month.
Avoid shadowing hints for attribute assignments
Released on 2026-06-22.
TypeOf across multiple union arms (#26230)TypeOf growth during cycle recovery (#26163)Divergent (#26162)error-on-warning the default (#26157)CycleDetector::seen (#26181)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.52/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.52/ty-installer.ps1 | iex"
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>
Fix bound TypeVar default cycle recovery
Released on 2026-06-18.
Annotated[Any, ...] as a class base (#26133)Any or Unknown bases are descriptors (#26120)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.51/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.51/ty-installer.ps1 | iex"
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>
Validate deprecated warning categories
Released on 2026-06-17.
Final as a special form on hover (#26029)TYPE_CHECKING (#26051)duplicate-base diagnostics (#26107)@no_type_check in function validation (#25994)& and ~ (#26035)==, !=, and match (#25788)__match_args__ (#25934)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.50/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.50/ty-installer.ps1 | iex"
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>
Fix site-package error when multiple versions of Python are installed in system path
Released on 2026-06-11.
enum.property instances (#25849)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.49/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.49/ty-installer.ps1 | iex"
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>
Avoid redundant constraint saturation work
Released on 2026-06-10.
extra_items (#25591)closed=True TypedDict precision (#25651)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.48/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.48/ty-installer.ps1 | iex"
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>
Avoid panicking on encountering a recursive NamedTuple that references a recursive NewType
Released on 2026-06-10.
Box<SystemPath> etc. in Files (#25554)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.47/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.47/ty-installer.ps1 | iex"
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>
Avoid crash when hovering over Callable
Released on 2026-06-08.
Callable() in match statement class patterns (#25541)enum.property (#25681)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.46/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.46/ty-installer.ps1 | iex"
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>
Preserve deprecation on replacement functions
Released on 2026-06-08.
missing-type-argument lint rule (#25617)Arc (#25735)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.45/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.45/ty-installer.ps1 | iex"
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>
Avoid treating sys.implementation.version like sys.version_info
Released on 2026-06-04.
sys.implementation.version like sys.version_info (#25608)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.44/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.44/ty-installer.ps1 | iex"
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>
Don't inject Unknown from non-callable elements of intersection call
Released on 2026-06-03.
Unknown from non-callable elements of intersection call (#25538)possibly-missing-attribute (#25561)typing.Callable from collections.abc.Callable (#24954)global/nonlocal bindings in type inference (#25387)Self in type aliases (#25529)__len__ methods for literals (#25600)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.43/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.43/ty-installer.ps1 | iex"
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>
Fix narrowing of enum literal unions by member identity
Released on 2026-06-01.
Generator assignability workaround to Python 3.13+ (#25472)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.42/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.42/ty-installer.ps1 | iex"
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>
Avoid panic for deferred dataclass field annotations
Released on 2026-05-31.
bool for not applied to dynamic values (#25445)completeFunctionParentheses editor setting (#3513)missing-override-decorator rule (#25111)Callable type (#25308)TypeForm in ty_extensions (#25421)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.41/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.41/ty-installer.ps1 | iex"
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>
Accept complete enum-literal alias unions as enums
Released on 2026-05-27.
LiteralString when hovering over an inline of a literal string in an IDE (#25373)invalid-generic-class diagnostics regarding incompatible variance (#25385)type(...), types.new_type(...), etc. (#25413)Literal enum subsets (#25379)typing.TypeForm (#25334)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.40/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.40/ty-installer.ps1 | iex"
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>
This release removes the Python 3.9 branches from our vendored standard library stubs. ty now only has "full" support for Python 3.10 and later, but w
Released on 2026-05-22.
This release removes the Python 3.9 branches from our vendored standard library stubs. ty now only has "full" support for
Python 3.10 and later, but will still report version-specific syntax errors and other diagnostics when --python-version 3.9
is provided via the CLI.
__new__ assignments to classes (#25282)dict-compatible fallbacks in TypedDict unions (#25242)self (#25077)order=True (#21704)dict(TypedDict) as dict[str, object] (#24852)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.39/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.39/ty-installer.ps1 | iex"
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>
Fix panic in enum literal during cycle recovery
Released on 2026-05-19.
NewType base expansion during cycle recovery (#25234)_generate_next_value_ with custom construction hooks (#25210)except handlers (#25231).gitignore changes (#25183)_generate_next_value_ methods in enums (#25196)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.38/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.38/ty-installer.ps1 | iex"
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>
Fix async iteration over narrowed typevars
Released on 2026-05-16.
not in narrowing (#25161)__new__ (#25185)reveal_protocol, reveal_mro, etc. with keyword arguments (#25179)__new__ with custom metaclasses (#25180)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.37/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.37/ty-installer.ps1 | iex"
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>
Fix Go To-Definition for self-imported submodules
Released on 2026-05-14.
ClassVar[Self] assignment checks for class objects (#24657)Callable-bounded TypeVars (#24793)Self fields (#25094)args[0] for static_assert (#25149)TypeOf recursion in generic callables (#24668)includeDeclaration request parameter (#24960)__new__ values as dynamic (#25136)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.36/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.36/ty-installer.ps1 | iex"
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>
Allow ParamSpec specialization through unioned generic classes
Released on 2026-05-10.
__class__ checks (#24997)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.35/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.35/ty-installer.ps1 | iex"
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>
Avoid panic in recursive protocol signature comparisons
Released on 2026-05-01.
Annotated metadata in semantic tokens (#24890)functools.partial (#24582)TypeIs assignability with gradual types (#24928)dict(**TypedDict) in TypedDict context (#24709)infer_variance for legacy TypeVar (#24930)ParamSpec (#24927)Union of TypedDict in various sites (#24958)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.34/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.34/ty-installer.ps1 | iex"
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>
ty now prefers the declared type of an annotated assignment in more situations (#24802). Consider this example:
Released on 2026-04-28.
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.
finally blocks where all try/except blocks are terminal (#24882)ClassVar vs instance-attribute overrides (#24767)Unpack[...] (#24868)Callable type context (#24317)** unpacking of TypedDict in dict-literal assignments (#24703)Unpack[TypedDict] in **kwargs signatures (#24653)[*xs] as an irrefutable pattern when matching on Sequence (#24787)invalid-return-type diagnostics, invalid-yield diagnostics, attribute assignment diagnostics (#24770, #24771)dict assignment error diagnostics (#24768)invalid-key diagnostics for unions of TypedDicts (#24693)invalid-type-form diagnostics for PEP-613 type alias values (#24760)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.33/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.33/ty-installer.ps1 | iex"
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>
Fix panic when __get__ uses Concatenate self-type and wraps a __call__
Released on 2026-04-20.
__get__ uses Concatenate self-type and wraps a __call__ (#24692)Callable type context (#24661)@overload-decorated function has no docstring (#23920)if statements in TypedDict bodies (#24702)@disjoint_base on TypedDicts and Protocols (#24671)@dataclass_transform-decorated class to have dataclass-like semantics if it has type in its MRO (#24679)Never setters or deleters (#24510)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.32/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.32/ty-installer.ps1 | iex"
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>
Avoid panic from double inference for namedtuple(typename=T, field_names=x, {})
Released on 2026-04-15.
namedtuple(typename=T, field_names=x, **{}) (#24641)Enum(...) names (#24638)Enum(value=...) (#24639)invalid-key fix doesn't converge, and override-of-final-method produces invalid syntax (#24649)ty:ignore comments inserted by --add-ignore for diagnostics starting on the same line (#24651)--fix mode to enable auto-fix for diagnostics (#24097)NamedTuple field conflicts (#24542)EnumMeta.__call__ for enum constructor signatures (#24513)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.31/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.31/ty-installer.ps1 | iex"
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>
As of v0.0.30, ty no longer unions Unknown into most inferred types of unannotated attributes. For example:
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.
ParamSpec in Concatenate prefixes (#24474)Callable types (#24497)TYPE_CHECKING state from outer blocks (#24470)__init_subclass__ calls (#24541)type[T] to a metaclass (#24515)ParamSpec-specialized class calls (#24399)TypedDict field types as type context to inform the inference of arguments passed to TypedDict constructors (#24422)typing and collections higher than third party re-exports (#23643)TypedDict constructor support in the LSP by synthesizing __init__ (#24476, #24522, #24535)info subdiagnostics in LSP diagnostic messages (#24328)Enum(...) syntax (#23602, #24570, #24571)Final variable assignments in __post_init__ (#24529)type[...] annotations, e.g. type["MyClass"] (#24518)__init_subclass__ = None (#24543)TypeGuard and TypeIs narrowing for unbound method calls (#24612)list[int][0] leads to 1 diagnostic, rather than 2 (#24354)dataclass_transform metadata from metaclass bases (#24615)None accessors in manual property construction (#24492)Final attributes (#24508)TypedDict unpacking (#24446)str constructor (#24514)Unknown into types of un-annotated attributes (#24531)super() in metaclass methods (#24483)Concatenate type-expression parsing (#24172)if TYPE_CHECKING block (#24394)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.30/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.30/ty-installer.ps1 | iex"
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>
Avoid special-casing for dataclasses.field if it's not in field_specifiers
Released on 2026-04-05.
dataclasses.field if it's not in field_specifiers (#24397)environment.python-version values in configuration files (#24402)requires-python (#24401)types.new_class (#23144)with statement (#24395)__new__ and metaclass __call__ return types (#24357)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.29/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.29/ty-installer.ps1 | iex"
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>
Mark loop header assignments as used to avoid false positives in "unused variable" diagnostics
Released on 2026-04-02.
extra_items keyword argument to class-based TypedDicts as an annotation expression (#24362)x: list[int | None] = [None] * 2 (#24197)infer_type_expression for parsing parameter annotations and return-type annotations (#24353)infer_type_expression for validating PEP-613 type aliases (#24370)extra_items keyword to functional TypedDicts (#24360)TypedDicts (#24345)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.28/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.28/ty-installer.ps1 | iex"
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>
Fix panic on debug builds when attempting to provide autocomplete suggestions for list[int] ()
Released on 2026-03-31.
list[int]<CURSOR>() (#24167)list[Annotated[()]] (#24303)type A = TypeIs[Callable[[], A]] (#24245)_cls as the name of the first argument for synthesized collections.namedtuple constructor methods (#24333)get() defaults (#24231)pop() defaults (#24229)Final attribute assignment rules for annotated and augmented writes (#23880)Callable type context (#23888)Callable type context (#22633)await expressions (#24256)Final when emitting a diagnostic about a Final variable being reassigned (#24194)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.27/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.27/ty-installer.ps1 | iex"
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>
Prevent "too many cycle iteration" panics in more situations
Released on 2026-03-26.
typing.Concatenate (#23689)converters (#23088)Self in metaclass and static methods (#23231)dict() (#24103)dataclass_transform params (#24170)Literal type(#24185)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.26/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.26/ty-installer.ps1 | iex"
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>
Support type:ignore[ty:code] suppressions
Released on 2026-03-24.
type:ignore[ty:code] suppressions (#24096)TypedDict | dict unions (#24151)NewTypes of unions vs. unions (#24087)N & ~T to Never if B & ~T would simplify to Never, where B is the concrete base type of a NewType N (#24086)TypedDict update (#24101)TypedDict updates (#24128)reveal_type diagnostics in unreachable code (#24070)isinstance() reachability analysis (#24077)yield expression types (#23796)invalid-metaclass (#24145)Never (#24056)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.25/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.25/ty-installer.ps1 | iex"
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>
Ensure TypedDict subscripts for unknown keys return Unknown
Released on 2026-03-19.
TypedDict subscripts for unknown keys return Unknown (#23926)TypeIs (#23784)/usr/local/lib dist-packages on Debian/Ubuntu (#23797)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.24/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.24/ty-installer.ps1 | iex"
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>
Fix false-positive diagnostics for PEP-604 union annotations on attribute targets on Python 3.9 when from __future__ import annotations is active
Released on 2026-03-13.
from __future__ import annotations is active (#23915)dataclass_transform: Respect kw_only overwrites in dataclasses (#23930)Literal types (#23875)# (#23831)possibly-missing-submodule error code (enabled by default), and make possibly-missing-attribute ignored by default (#23918)from __future__ import annotations only stringifies type annotations (#23928)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.23/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.23/ty-installer.ps1 | iex"
Fix issue where variables could be inferred as Divergent if they were assigned using tuple unpacking in loops
Released on 2026-03-12.
Divergent if they were assigned using tuple unpacking in loops (#23812)error = "all" in a root pyproject.toml file to be overridden using tool.ty.overrides in a subdirectory's pyproject.toml file (#23712)type[] types to their constructor Callable type during assignability checks, not during redundancy/subtyping checks (#23834, #23901)ty explain <RULE> CLI command (#23766)TypeVarTuple parameters (#23807)LiteralString to be narrowed using equality checks (#23794)types.ModuleType (#23786)__setitem__ dunder calls (#23800)t | {"foo": int} as TD if t is an instance of a TypedDict td with a foo: int key (#23806)T to T & str rather than str if T is a constrained TypeVar with str as one of its constraints (#23850)None to None | Unknown in invariant contexts (#23790)type[Callable] in type annotations (#23753)T & ~S is always inferred as a subtype of U during generic inference if T is understood as a subtype of U (#23728)curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.22/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.22/ty-installer.ps1 | iex"
Avoid stack overflow with recursive typevar
Released on 2026-03-05.
*args unpacking into optional positional parameters (#23124)Any attributes with object after isinstance narrowing (#23725)all selector to ty.json schema (#23721)all selector in TOML configurations (#23723)all selector case-sensitive (#23713)invalid-enum-member-annotation lint rule (#23648)TypeVar is used to specialize a ParamSpec, or vice versa (#23738)Unknown into unannotated container types (#23718)name and value of an enum (#23683)Callable (#23625)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.21/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.21/ty-installer.ps1 | iex"
Disallow negative narrowing for isinstance() or issubclass() checks involving type[] types
Released on 2026-03-02.
isinstance() or issubclass() checks involving type[] types (#23598)NewType of float and an instance of Any/Unknown (#23620)Callable with a variadic positional parameter could be a subtype of a Callable with a positional-or-keyword parameter (#23610)t.__mro__ if t is an instance of type[Any] (#23632)Callable targets (#23277)python -m ty works even when ty was installed into an ephemeral virtual environment (#2852)P.args and P.kwargs (#23640)Required/NotRequired, and ban them both outside of TypedDict fields (#23627)@final on non-methods (#23604)Unpack when used with tuple types (#23651)isinstance() and issubclass() (#23607)dataclass_transform dataclasses as neither frozen nor non-frozen (#23366)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.20/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.20/ty-installer.ps1 | iex"
Fix panic in diagnostic rendering when attempting to render a code frame pointing to leading whitespace
Released on 2026-02-26.
x = y = {"a": 1} (#23523)TypeAliasType definitions (#23397)typing.Generator prior to Python 3.13 (#23386)await foo() if foo returns typing.Awaitable[typing.Never] or similar (#23479)type[T] types (#23472)case {...}: patterns in match statements (#23462)assert_type calls or false-positive redundant-cast diagnostics by reimplementing the equivalence type relation as mutual subtyping of top and bottom materializations (#23428)__contains__ narrowing with PEP-695 type aliases (#23545)_value_ annotations on enum classes (#22228)--output-format=github is specified (#23455)Literal types in unions are upcasted to nominal-instance types in situations where the union type is recursively defined (#23521)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.19/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.19/ty-installer.ps1 | iex"
Support classes dynamically created via type(...) with cyclic bases
Released on 2026-02-20.
type(...) with cyclic bases (#22792)TypeOf in annotations (#23407)ty server interactively (#23416)call_signature_details parameter types (#23149)--output-format to ty version (#23387)match statements (#22939)Self in ClassVar type annotations (#23362)ClassVar-qualified declarations when determining whether an abstract method has been overridden in a subclass (#23381)Final and ClassVar (#23365)assert_never (#23389)assert_type diagnostic messages (#23342)LiteralString for f"{literal_str_a} {literal_str_b}" (#23346)[abstract-method-in-final-class] diagnostics less verbose for classes with many abstract methods (#23379)@final classes (#23376)Never to terminate control flow (#23419)Sequence[<constituent integers in the bytestring>] (#23329)Iterable parameter in type variable inference. (#23326)Callable type returning a TypeGuard type (#23280)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.18/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.18/ty-installer.ps1 | iex"
Assign lower completion ranking to deprecated names in auto import
Released on 2026-02-13.
Literal promotion for constrained TypeVars with Literal bounds (#23209)TypeVar shadowing checks (#23222)typing.Self in attribute annotations (#23108)NoReturn functions (#23109)os.name checks (#23230)Final class variables in subclasses (#23180)None (#23246)Any (#23248)ParamSpecs in some situations (#23211)__init__.py (#21795)datetime.UTC) in auto-import in more cases (#23249)UnionBuilder overhead when creating a new union from the filtered elements of an existing union (#22352)--output-format=junit (#22125)inconsistent-mro diagnostics (#23213)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.17/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.17/ty-installer.ps1 | iex"
Assign lower completions ranking to deprecated functions and classes
Released on 2026-02-10.
Optional (#23200)@no_type_check when combined with other decorators (#23177)Foo in autocomplete suggestions when the user is typing out Foo's bases (#23141)TY_OUTPUT_FORMAT environment variable (#23123)python3 found in $PATH if no environment is found (#22843)inconsistent-mro autofix to move Generic[] to the end of the bases list (#22998)struct.unpack (#22562, #23130)@classmethod or @staticmethod (#23182)total= keyword to TypedDict classes that had PEP-695 type parameters (#23114)__dataclass_transform__ to support SQLModel (#23070)__gt__, etc.) where a parameter is annotated with a Literal type (#23100)TypedDict constructor calls for generic aliases and type[...] targets (#23113)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.16/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.16/ty-installer.ps1 | iex"
Add support for resolving imports of packages installed into Debian/Ubuntu dist-packages directories
Released on 2026-02-04.
dist-packages directories (#22466)not-iterable false positives when iterating over an instance of an intersection type with only negated elements (#22089)Final symbol cannot be reassigned even after a conditional binding (#22986)Self resolution for classes nested within methods (#22964)match statements (#22870)__contains__ to respect descriptors (#23056)nonlocal variables with conditional assignments (#22966)NewTypes of NewTypes of float (#22997)Callable type (#22902)dataclass_transform: Fix visibility of field specifiers when models are nested inside methods (#23069)Unknown for bare Final instance attributes (#23003)Final in on-hover hints (#23005)unused-type-ignore-comment rule (#22790)./src as a search path if ./src/__init__.py(i) does not exist (#22851)Final but never has any bindings (#23001)order=True dataclasses (#22689)invalid-argument-type and invalid-assignment diagnostics if a variable is annotated with a type from the numbers module (#22931, #22938)unresolved-reference to suggest using "list" instead of "List" (#22827)... in odd places inside tuple specializations (#22889)Required, NotRequired and ReadOnly in parameter annotations (#22888)TypeVar bounds or constraints from containing type variables (#22949)tuple specialization (#22884)Callables in the return type of function signatures (#22954)isinstance() and issubclass() calls against TypedDict classes (#22887)issubclass() calls against Protocol classes with non-method members (#22896)Protocol[] and Generic[] simultaneously (#22948)TypeVarTuple is used to subscript Generic or Protocol without being unpacked (#22952)__getattr__ or __getattribute__ when looking up attributes on class objects (#22985)NewTypes with generic bases (#22961)** is used with a non-mapping in the context of a call to an overloaded function (#22921)ParamSpec from class constructors for callable protocols (#22853)invalid-overload diagnostics (#22933)@final decorator when emitting invalid-overload errors for invalid @final decorators (#22893)Literal types when inferring elements for very large unannotated tuples, for improved performance (#22841)Protocol classes as implicitly abstract (#22838)TypeVarTuples (#22950)Any() in match class patterns (#23011)type[None] in type expressions (#22892)pkg_resources.declare_namespace (#22987)__post_init__ methods (#22730)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.15/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.15/ty-installer.ps1 | iex"
Consider keyword arguments when unpacking a variadic argument
Released on 2026-01-26.
unsupported-operator for "symmetric" TypeVars (#22756)memo.changed_at assertion panics (#22498)allowed-unresolved-imports setting (#22800)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)empty-body return code for functions with stub bodies that have non-None return annotations (#22846)await outside functions (#22826)Generic[] subscript (#22738)Unknown fallback (#22778)match class pattern (#22836)TypedDict types with >=1 required key as being always truthy (#22808)@final decoator when emitting invalid-overload errors for invalid @final decorators (#22812)*args and **kwargs when calling a ParamSpec callable (#22820)TypedDict definitions (#22811)typing.NamedTuples (#22718)namedtuple() and NamedTuple calls (#22765)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.14/ty-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.14/ty-installer.ps1 | iex"
Your coding agent can read these notes before it upgrades. Set up the MCP server →