pypi / ty
ty
What changed in ty 0.0, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
146 breaking3 security7 deprecations96 new APIs and options108 performance285 behavior and defaults117 tooling959 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initty 0.01721 changes
Breaking changes 146
Rejects union narrowing attempts when nested calls fail.
Incompatible TypeIs narrowings are split into two new rules.
This diagnostic is split out of import-not-found into a separate rule.
Single-constraint TypeVar calls now use the constraints rule.
The diagnostic rule is renamed to
abstract-method-call; configurations using the old name may need updating.The diagnostic rule is renamed to
not-callable; configurations using the old name may need updating.The diagnostic rule is renamed to
call-to-function-with-unknown-signature; configurations using the old name may need updating.The diagnostic rule is renamed to
invalid-dataclass-field-order; configurations using the old name may need updating.The rule is renamed as part of the focused-rule split, so configurations using its old name may need updating.
The diagnostic rule is renamed to
implicit-string-concatenation-in-annotation; configurations using the old name may need updating.The rule is split into three focused rules, changing how developers select and configure these diagnostics.
Abstract class instantiation has its own diagnostic rule.
Diagnostics distinguish attributes missing from some union members.
The incompatible override rules are renamed.
This diagnostic is split out from incompatible method override.
The invalid-key diagnostic is split into three TypedDict diagnostic rules.
The unresolved-import diagnostic is renamed to import-not-found.
NO_COLOR takes precedence over FORCE_COLOR and CLICOLOR_FORCE in diagnostics.
Rejects defaulted TypeVars after a TypeVarTuple in legacy generic classes.
Check implicit and PEP 613 type aliases as type expressions at their definitions.
Liskov diagnostics now check inherited attribute conflicts.
The type checker rejects runtime_checkable when applied to a non-protocol class.
Deleting, popping, or defaulting read-only TypedDict items is reported.
Enables the invalid-mutable-override rule by default.
Type checking now checks attribute and property override types.
The default Python version is updated to 3.15.
Treats bound methods without a receiver as not callable.
Limits wildcard exports using a literal __all__.
Notebook files are no longer read when discovering scripts.
Rejects class-scoped type variables in __init__ receivers.
Rejects unsafe TypedDict updates from hidden fields.
Instantiating an abstract class is rejected.
Imports are treated as bindings instead of declarations.
Reassignment of enum members is now rejected.
Type checking reports override conflicts introduced by new bases.
Requires a direct dependency for reveal_type backport fixes.
Rejects missing attributes on type[] aliases.
Rejects circular type alias definitions.
Rejects class access to generic instance attributes.
Invalidates member narrowing across loop iterations.
Fixed tuples are rejected for non-inferable TypeVarTuples.
Incompatible constructor context is rejected for variadic packs.
Generator-expression exceptions are treated as eagerly evaluated.
Invalid module-level __getattr__ calls are diagnosed.
Protocol members now require ClassVar declarations.
Object members are considered when comparing protocols.
Rejects unsupported dataclass_transform parameters.
This setting replaces the removed deprecated src.root setting.
Rejects unhashable objects for Hashable protocols.
Rejects Self with incompatible explicit receiver annotations.
Removes the deprecated setting; use environment.root instead.
Stub-only helpers are no longer visible through implicit builtin lookup.
ty rejects ClassVar and Final qualifiers in NamedTuple fields.
ty emits a diagnostic when a non-generic class is specialized.
ty rejects specializing non-generic subclasses.
ty rejects ParamSpec components that are out of scope.
Unknown is moved out of the experimental ty_extensions API.
Rejects deletion of frozen dataclass fields through subclasses.
Treats bivariance as covariant.
Known-instance types, generic aliases, and non-singleton special-form types are no longer considered single-valued.
Pydantic sub-model fields receive stricter validation in lax mode.
Removes unused own-line ignore comments.
Type checking enforces declared domains for receiver TypeVars.
The
invalid-type-guard-calldiagnostic is removed.Rejects undeclared instance attributes on protocols.
Non-empty ranges are no longer treated as single-valued, and non-empty range calls are treated as non-empty for reachability.
The CLI now enables error-on-warning by default.
Classes with Any or Unknown bases are no longer assumed to be descriptors.
Invalid combinations of dataclass flags are rejected.
Legacy TypeVars in PEP 695 class bases are rejected.
Legacy TypeVars in PEP 695 functions are rejected.
Zero-step slices on lists are diagnosed.
Restricts length narrowing to types that encode their length.
Requires subtyping for transitive constraint pivots during type checking.
Dynamic class attributes are no longer treated as instance attributes.
Type checking now checks implicit open TypedDict extra items.
Selfis rejected in type aliases.TypedDict flags must be literal booleans.
Annotations on non-name targets are ignored and rejected.
Inconsistent generic bases are rejected for dynamic classes created using type(...), types.new_type(...), and similar mechanisms.
Type checking now rejects incompatible explicit variance in generic base classes.
ty emits a diagnostic for subclassing with order=True.
Full support now starts at Python 3.10; with --python-version 3.9, ty still reports version-specific syntax errors and other diagnostics.
Dataclass decorator parameters are rejected according to the supported Python version.
Non-generic overload implementations are now checked.
Invalid uses of Unpack now produce a diagnostic.
Disallows using @disjoint_base on TypedDicts and Protocols.
Rejects properties with Never setters or deleters.
Reduces the source code context window to zero.
Deleting Final attributes is rejected.
A diagnostic is emitted when inheriting from a class with __init_subclass__ = None.
Bare ParamSpec is disallowed in Concatenate prefixes.
Inferred types of most unannotated attributes no longer include Unknown, which can change diagnostics across a codebase. Initializers of None and other non-literal singleton types remain exceptions.
Enum attributes with type annotations are treated as members.
Configuration files with unsupported environment.python-version values are rejected.
Validation of subscripts and attributes in type expressions is tightened.
TypedDict fields are validated when subclassing.
Enforces Final attribute assignment rules for annotated and augmented writes.
Type qualifiers are now banned in PEP-695 type aliases.
Validates the return type of generator functions.
Disallows Self in metaclass and static methods.
Read-only fields are disallowed in TypedDict updates.
Narrows keyword arguments when unpacking dictionary instances.
Adds a distinct error code for possibly missing submodules; it is enabled by default.
Module-literal types are no longer promoted to types.ModuleType.
Detects invalid partially stringified PEP-604 unions.
Rejects type[Callable] in type annotations.
Adds validation for type parameters with defaults after TypeVarTuple parameters.
Makes the
allselector case-sensitive.No longer unions
Unknowninto unannotated container types.Detects unbound type variables in annotations.
Rejects ellipsis literals in invalid locations in type and annotation expressions.
Detects invalid uses of @final on non-methods.
Rejects generic metaclasses parameterized by type variables.
Rejects functions whose PEP-695 type parameters shadow type parameters from enclosing scopes.
Nested Required and NotRequired are banned, as are uses of either outside TypedDict fields.
Validates that type variable defaults do not reference later type parameters or parameters out of scope.
Calls to instances of
type[T]types now receive stricter handling.Annotated assignments to attributes on self are now validated.
Literal promotion is now performed only for implicitly inferred literals.
PEP-613 type alias values may no longer contain type-qualifier special forms.
Disallows type variables within PEP-695 type variable bounds and constraints.
Emits an error for invalid type variable defaults.
Emits an error when an attribute is accessed on a union and some elements do not have that attribute.
The checker now disallows TypeVars within ClassVars.
The checker now emits a diagnostic for unbound calls to abstract
@classmethodor@staticmethodmethods.A
Finalsymbol cannot be reassigned after a conditional binding, and unboundFinaldeclarations now receive a diagnostic.Disallows
Required,NotRequired, andReadOnlyin parameter annotations.Functions with stub bodies in Protocol classes are recognized as implicitly abstract.
Diagnoses
...in invalid positions and multiple unpacked variadic tuples in a tuple specialization.Legacy TypeVar bounds and constraints cannot contain type variables.
Requires TypeVarTuple to be unpacked when used to subscript
GenericorProtocol.Emits a diagnostic for an unimplemented abstract method on a @final class.
Emits an error when the same type parameter appears more than once in a Generic[] subscript.
Calling a ParamSpec callable now requires both *args and **kwargs.
Validation of TypedDict definitions is stricter.
Emits diagnostics when NamedTuple, TypedDict, Enum, or Protocol classes are decorated with @dataclass.
Emits diagnostics for stringified annotations whose quoted expression is invalid.
Makes
NamedTuple(...)andnamedtuple(...)calls stricter.Rejects NewTypes with generic bases.
Adds a diagnostic for uses of
finalthat are not decorators.Emits diagnostics for method definitions and other invalid statements in TypedDict class bodies.
Callable type materializations are fixed and simplified, changing core type-checking behavior.
A type object's callable type is no longer treated as function-like, affecting type-checking results.
Float and complex types are promoted when promoting literals, changing core type-checking results.
The rule formerly named non-subscriptable is renamed not-subscriptable; update references to the old rule name.
Security 3
macOS and Windows executables in release archives and ty wheels are signed, enabling publisher and binary integrity verification and supporting publisher-based allowlisting.
Fixes a use-after-free vulnerability that could allow arbitrary code execution when analyzing a specially crafted Python project; users running ty on untrusted code should upgrade.
Embeds archive checksums in the shell installer.
Deprecations 7
Warns when configuration or ignore comments use renamed rules.
Reports deprecated overloads in decorator applications.
Deprecation diagnostics are reported for property accessors on intersections.
Deprecation diagnostics are reported for implicit constructor calls.
Deprecation diagnostics are reported for overloads, operators, and properties.
Deprecated unary operations are reported.
Running the server interactively now displays a warning message.
New APIs and options 96
Adds the project-manager.script configuration option with the value uv.
The LSP server now supports the workspace/willRenameFiles request.
Add the preview
tool.ty.baselinesetting to configure a diagnostic baseline file, helping adopt ty in projects with existing errors.Add a command-line option to record existing diagnostics in the configured baseline.
Infer the types of Django model primary keys pk and the automatic id with django-types.
Emit SARIF reports with the sarif output format.
This setting enables return type inference; it is disabled by default.
Adds the mismatched-sentinel-name rule as an opt-in diagnostic.
Supports slots_default in dataclass_transform.
Adds the opt-in truthiness-test-of-none-union rule.
Introduces Recursive types and full support for recursive implicit type aliases.
Adds support for type[A & B].
Adds rules to detect conditions that are always truthy or always falsy.
A new diagnostic rule reports disjoint casts.
Adds a preview rule that detects missing direct dependencies.
A dedicated diagnostic is available for missing slots.
Tagged unions support multiple tags per type.
Adds executable discovery to the server command.
Supports pull diagnostics for notebook cells.
Adds support for __slots__.
Adds an opt-in rule for variables that diagnoses unsound assignments.
Adds the untrustedWorkspace option to the LSP.
Adds an opt-in diagnostic rule for function decorators that transform a non-dynamic type into a dynamic type.
Implements intersection meta-type projection in the type checker.
Adds an opt-in lint for unsound return statements.
Adds an opt-in lint for unsound yields.
Pydantic models now have a synthesized __replace__ method.
Adds an option to exclude scripts.
Adds support for generic manual PEP 695 type aliases.
Adds an option to include scripts.
The LSP server implements the
textDocument/implementationrequest, enabling clients to request implementation locations.Pydantic BaseSettings models now support special underscore parameters.
Supports TypeVarTuple and Unpack in type checking.
Protocol support now includes class and static methods.
Protocol types are now supported in
type[Protocol]annotations.Adds a rule for blanket ignore comments.
Adds support for dict model configurations in Pydantic.
Adds support for validation of RootModel fields.
Adds Pydantic support for validate_by_alias.
Adds Pydantic support for validate_by_name.
Adds Pydantic support for validation_alias.
ty detects Pydantic model configurations.
ty supports extra arguments in Pydantic model constructors.
ty distinguishes lax and strict mode for Pydantic models.
The LSP server implements rust-analyzer's feature for opening the full compiler diagnostic.
Models non-exhaustive enum member sets for enum.Flag.
Intersection and negation types are annotated using & and ~.
The LSP server provides context-sensitive keyword completions.
Adds type-checking support for TypedDict extra_items.
Individual constraints can have optional lower and upper bounds.
The LSP server adds call hierarchy support for editor integrations.
The LSP server adds function parentheses completion.
Adds an opt-in diagnostic rule for missing override decorators.
Support is added for typing.TypeForm.
The LSP server supports type aliases in document symbols.
Adds support for class decorators in type checking.
Adds first-class support for enum complements in type checking.
Supports custom
_generate_next_value_methods in enums.Adds type-checking support for sentinel values as described in PEP 661.
ParamSpec now supports variance keywords.
Legacy TypeVar now supports infer_variance.
Adds a mode to enable auto-fix for diagnostics.
Functional Enum(...) syntax is now supported.
Core type checking adds support for types.new_class.
Adds support for functional TypedDict declarations.
Suppressions using type:ignore[ty:code] are now supported.
Adds the ty explain <RULE> CLI command.
Adds the
allselector to thety.jsonschema.The LSP server adds support for the protocol's type hierarchy feature.
Supports
_value_annotations on enum classes.The LSP server now supports code folding.
Adds the replace-imports-with-any configuration option.
Adds the --output-format option to ty version.
Adds auto-import support for symbols shown in inlay hints.
Adds type-checking support for generic protocols.
Adds support for the junit output format via --output-format=junit.
Adds support for using typing.Self in attribute annotations.
The CLI now supports configuring output format with the
TY_OUTPUT_FORMATenvironment variable.Configuration adds a mechanism to ignore, warn about, or select all rules.
Type expressions now support
type[None].Adds the
unused-type-ignore-commentrule.Adds the allowed-unresolved-imports setting.
Adds a return code for functions with stub bodies and non-None return annotations.
Adds support for subscripts on intersections.
Supports passing
typenameandfield_namesby keyword argument tocollections.namedtuple()calls.Supports overriding
respect-type-ignore-comments.Adds the --add-ignore CLI option.
Adds support for comparisons between variable-length tuples.
The LSP server gains an option to disable syntax errors.
Supports custom builtins via __builtins__.pyi.
Adds diagnosticMode: off to disable diagnostics while retaining features such as Go To Definition.
Supports type inference between protocol instances.
Adds the respect-type-ignore-comments configuration option.
Adds the ty.configuration LSP option.
Adds the ty.configurationFile LSP option.
Adds the --force-exclude CLI option.
Performance 108
Skips enum-complement recognition when there are no exclusions.
Avoids exponential constraint search when inferring generic constructors.
Skips repeated validation lookups for checked overloads.
Speeds up find references in workspaces with many unicode files.
Speeds up materialization of nested generic types.
Avoids definition lookups during recursive TypedDict comparisons.
Avoids tracking ordinary instances twice during type searches.
Skips union comparisons for unrelated nominal classes, improving memory usage.
Avoids cubic narrowing for enum OR patterns, improving performance when checking these patterns.
Comparisons of deeply nested tuples are faster.
Prevents exponential memory growth when narrowing unions of intersections by equality.
Reuse runtime operands in eager union annotations.
Reuse exception checkpoints when a new place is read.
Optimize Linux x86-64 ty releases with LLVM BOLT.
Avoid replaying conditions in long boolean expressions.
Speed up match narrowing over large unions.
Index nominal union alternatives.
Record predicate truthiness alongside expression inference.
Skip predicates that cannot affect narrowing.
Normalize runtime unions on demand.
Reuse tuple pattern analysis work.
Short-circuit comparisons involving top and bottom callable signatures.
Reuse class member lookups when checking overrides.
Reuse each generic context's inferable type variables.
Avoid redundant work when checking inherited attributes.
Skip inferred writes when a declaration determines an instance member.
Check for instance storage without inferring method assignments.
Skip method signature inference for concrete decorator results.
Check non-recursive protocol members before recursive ones.
Collect receiver annotations once per class.
Compares protocol receiver restrictions before binding.
Pauses caused by clearing cached ASTs are mitigated in more language server operations.
Speeds up generic class-pattern narrowing by skipping impossible intersection comparisons.
Avoids constructing nominal complements.
Optimizes system path equality.
Constraints are shared in retained sequent maps to improve memory usage.
Reuses cached type alias inference for diagnostics.
Fuel management in the constraint solver is optimized.
Strings in dependency metadata are shared to improve memory usage.
Rendered union elements are reused when displaying types.
Reduces retained AST memory by shrinking expressions.
Avoids redundant superclass member inference.
Distributes len inference over unions.
Adds a fast path for concrete literal intersections.
Avoids repeated subtyping checks for materialized recursive protocols.
Recursive protocol checks for nested type variables are optimized.
Repeated inference is avoided for literal union call results.
Rejects impossible eager protocol comparisons early.
Avoids cubic narrowing with repeated assignments and context managers.
Avoids repeated traversal of shared alias arguments.
Infers function parameter default types lazily.
Optimizes inherited recursive protocol comparisons.
Avoids exponential narrowing of gradual string-literal unions.
ty avoids deriving sequents for type variables with concrete bounds.
Avoids exponential slowdown when copying narrowed TypedDict unions.
Avoids quadratic inference for large literal unions.
Improves importer performance.
Avoids repeated inference when copying mixed
TypedDictunions.Avoids expanding optional enum comparisons.
Improves union and intersection builder performance.
Avoids exponential narrowing for optional dynamic match subjects.
Caches non-terminal-call reachability prefixes.
Caches protocol
Selfbinding.Caches sparse reachability checkpoints.
Defers statement-call narrowing gates.
Overloaded protocol method returns are compared pairwise.
The fast path now supports both upper and lower bounds.
Self type scans are skipped for non-generic instances.
Parallel jobs are batched when finding references.
Avoids exponential invariant constraint paths.
Uses cached class literal lookup for is_subclass_of.
Reduces overhead for bound typevar identity.
Avoids exponential reachability analysis for OR patterns.
Enum comparisons in equality evaluation are optimized.
Filesystem concurrency is improved.
Compacts indexed AST node storage.
Discards dead DNF branches during intersection building.
Narrowing large unions is faster.
Module resolution is faster for projects with many search paths.
Avoids redundant constraint saturation work.
Caching is added for pattern match narrowing, improving performance.
Avoids redundant work for empty collection context.
Avoids exponential blow-up during fall-through narrowing.
Speeds up include filtering for projects with many literal include patterns.
Uses an incremental file walk when
.gitignorechanges.Reduces CPU usage when switching between large changesets.
Bounds loop-header analysis for large loops.
Cross-file find-references searches use multithreading to run faster.
Signature checking is optimized based on the number of arguments.
Memoizes binary operator return types.
Gates protocol compatibility checks on member count.
Avoids excessive memory usage for dataclasses with many fields.
Fixes a performance regression when narrowing on a larger Literal type.
Avoids duplicated work during multi-inference.
Conservative narrowing places are optimized.
Caches
ClassType::nearest_disjoint_base.Improves completion performance.
Optimizes union building for unions with many enum-literal members.
Improves UnionBuilder performance by using Type::is_redundant_with instead of Type::is_subtype_of calls.
Optimizes intersections with a single negated element.
Optimizes negated types.
The LSP server limits returned completions to reduce lag.
Speeds up bidirectional type-checking involving large unions by avoiding narrowing on non-generic calls.
Simplifies inferred types by avoiding storage of multi-inference attempts.
Improves union builder performance.
Performance is improved for large match statements.
Disjointness for TypedDicts is implemented, significantly speeding up checking of code that uses pydantic.
Type checking is faster.
Behavior and default changes 285
Shows progress and handles Ctrl-C during initial file indexing.
Reports workspace diagnostics while scripts initialize.
Completions are suppressed while typing multiline import aliases.
ty warns by default when there is a single overload.
Missing and inconsistent overload implementation diagnostics are separate.
Supports shadowing methods on instances.
PEP 723 scripts inherit project settings and overrides.
Diagnostics on recoverable invalid globs have lower severity.
Type arguments are inferred from generic TypedDict values passed to functions.
Type arguments are inferred using constraints from the whole call.
Places argument name inlay hints before grouping parentheses.
Skip scanning for scripts at startup and reload when uv script environments are disabled.
Generalizes nested types in inferred return types.
Inlay hints containing stub-only types are not inserted.
ParamSpecs can be inferred from call-wide constraints.
ty supports inferring return types for unannotated functions and methods.
A bare generic class name is specialized when used in a type[...] type context.
Inherited dataclass field converters are specialized.
Empty collection branches are inferred from nonempty literals.
Recursion guards are avoided for non-generic nominal targets.
Promotes bounded type variables to declared constraints.
Import completions in the LSP server now support namespace packages.
Infers nominal generic specializations from bounded type variables.
Ruff and ty now prefer existing @ paths over response files when resolving command-line arguments.
The LSP server refreshes Python settings when virtual environments change.
Rendered code is contained within Markdown fences in LSP output.
Specializes Self bounds through generic type aliases.
Inherits annotations for unannotated subclass defaults.
Refreshes uv project metadata when uv files change, so ty can use up-to-date project information.
Callable signatures are now inferred from bounded type variables.
Membership expressions with constant values in inline list and set literals can now be inferred as literal booleans.
Uses subtyping when determining constraint-set implication.
External files use workspace editor settings.
Projects for external files are selected using import search paths.
This diagnostic is disabled by default.
The LSP server now supports requests against closed documents.
Inference now works through optional generic containers in the legacy solver.
Includes required imports in every inlay hint.
Eagerly binds unused Self receivers.
Allows slots to override abstract properties.
Generalizes receiver binding for wrapped callables.
Conditional literals are inferred from peers in unspecialized contexts.
Dependency lints are supported when using this CLI option.
Generic elements are inferred from gradual tuples.
Experimental intersection syntax is allowed in PEP 695 aliases.
LSP string literal completions are filtered by the text already typed.
Preview behavior ignores the Python version from uv metadata.
Default exclude patterns are anchored at the project root.
Class objects are default-specialized during meta-protocol checks.
Existing autofixes receive descriptive titles in the LSP server.
Tuple variance is inferred from the full tuple specification and more precisely.
Narrows types with ordered length comparisons.
Infers variance through recursive protocols.
Lambda functions are always considered truthy.
In preview, workspace metadata is refreshed when dependencies change.
Recursive receiver inference is stabilized.
Simplifies intersections with subtype-related generic specializations.
Infers lambda parameters through callable type aliases.
Superseded queued uv requests are now canceled.
Treats recursive types as fallback cycles only when they have unbounded specializations.
Warns when uv metadata cannot support dependency checks.
Refreshes uv project metadata in the background.
Signatures inferred from bound receivers are expanded.
Tuple type parameters are inferred from union arguments.
Mixed gradual tuple assignability is supported with TypeVarTuple.
On Python 3.14 and newer, typing.Union is treated as a class.
Variance is inferred through nonrecursive protocol references.
Specializes type variables determined by bound receivers.
Infers generic protocols from class objects.
Supports unpacking tuple type aliases.
The language server no longer prefers unsafe fixes.
PEP 723 scripts can now be checked in isolation.
Pydantic accepts enum members for lax string and integer fields.
TypeVarTuple is supported in call binding.
ty models exception flow with operation checkpoints.
ty infers type variables through nominal type[...] parameters.
Supports Annotated inside type[...].
The LSP server enables and downranks auto-import completions from stub-only modules.
Recursive gradual type alias materialization is stabilized.
Variance is inferred through type[T].
Generic-class narrowing with isinstance is more gradual by default; for example, list narrows to list[Unknown] instead of Top[list[Unknown]].
Numeric tower displays are simplified, such as displaying float instead of int | float.
Infers generic TypedDicts from unpacked TypedDicts.
Infers generic TypedDicts through synthesized constructor signatures.
ty recognizes Pydantic models installed on extra search paths.
The LSP server triggers signature help after completing a callable with parentheses.
Type checking now prefers static solutions for constrained TypeVar instances.
Type checking now supports materialized class type expressions.
Mutation of private attributes on frozen Pydantic models is now allowed.
When adding a
ty: ignorecomment, the option now inserts a space after the colon.The LSP renders NumPy docstrings as structured Markdown.
Allows unresolved virtual-environment home paths when they are unused.
Equality narrowing now works across non-final classes.
Interpolated string literals can now be promoted to str.
When match narrowing infers a variable as A & B, its attribute is inferred as the intersection of the corresponding attribute types.
Reuses applicable own-line suppressions when adding ignores.
Accepts gradual constrained TypeVar solutions.
Prefers the innermost inline suppression.
Contextually infers custom
__setattr__assignments.Gates TypedDict PEP 728 parameters by Python version.
Pydantic field metadata is collected through subscripted generic Annotated aliases.
The LSP server renders Google docstrings as structured Markdown.
Narrows types based on inline list and set membership checks.
Infers isinstance results for aliases and type variables.
Infers isinstance results for fixed class tuples.
Narrows tagged unions based on tag truthiness.
ty now supports class objects that satisfy instance-method protocols.
Protocol checking derives setter domains for descriptors.
Exact-length narrowing is projected through TypeVars.
Generic call inference is now unified.
Suppression comments can now be placed on their own line.
Pydantic support now recognizes
populate_by_name.Pydantic support now recognizes field metadata in Annotated.
Pydantic support now handles custom initializers.
Type checking allows unsound equality-based narrowing for builtins.
Treats BaseSettings fields as optional by default.
Recognizes frozen Pydantic models via configuration.
Gates membership narrowing on __contains__ semantics.
Infers metaclass-declared attributes on class instances.
Ignores private attributes in Pydantic models.
Match subjects are narrowed through structural patterns.
Narrows exact tuples through sequence patterns.
Infers capture types for generic class patterns.
The type checker infers class and mapping pattern bindings.
The LSP server renders full diagnostics in color.
Empty collection constructors are inferred from later uses.
Tracking whether literal iterables are empty affects reachability analysis.
Widens inferred class-valued instance attributes.
Uses assignability for divergent constraints.
Infers definite equality comparison results and mismatched literal comparisons.
Allows replacing ordinary methods with compatible functions.
Ty now infers types for names bound in match patterns.
The LSP server publishes diagnostics for all open files after a single file is saved.
Recognizes exhaustive matches over finite tuples.
Rendering of fix diffs is more concise.
Raises the limit for the number of non-recursive union literals.
Hover renders reStructuredText fields in docstrings as Markdown.
Infers simpler types in complex lambda cycles.
The LSP server respects the client's preferred content format.
Enum literals are supported as tagged-union discriminants.
Non-empty collection literals receive full-scope bidirectional inference.
The checker infers precise values for standard-library enums.
ty now reports redefined legacy TypeVars.
Supports Callable() in match statement class patterns.
Type checking now supports narrowing on tuple match cases.
Type checking now enables narrowing for unions of TypedDict.
A callable type context can implicitly specialize a generic class.
The LSP server suppresses importable completions for names already in scope.
Precise
__len__methods are synthesized for literals.Type narrowing based on lengths is supported.
Adds support for tagged-union narrowing when the types are nominal.
Type checking now supports disjointness for protocol method members.
Complete enum-literal alias unions are accepted as enums.
Python notebook text documents are treated as Python sources.
Import completions prefer standard-library symbols over same-named symbols from third-party libraries.
When set to 3.9, ty continues to report version-specific syntax errors and other diagnostics despite Python 3.9 no longer receiving full support.
Type inference now supports multi-inference through type aliases.
Type inference now uses full-scope bidirectional inference for unconstrained container literals.
The LSP no longer shows argument inlays for case-insensitive matches or prefix and suffix matches.
Supports partially specialized type context for collection literals.
The LSP server emits folding ranges for an entire block.
Values from custom enum __new__ methods are treated as dynamic.
Path assignment implication checks are hoisted.
Type narrowing is supported on __class__ checks.
Overload consistency diagnostics now include error context.
Mixed constructor inference now includes TypedDict type context.
String key inference now includes TypedDict type context.
A union of homogeneous fixed-length tuples is selectively promoted to a single variadic tuple.
Type narrowing support within walruses is expanded.
Core type checking now supports functools.partial.
ty now shows a diagnostic for an unsupported inferred Python version.
Type narrowing now works with aliased conditional expressions.
When inferred and declared types are mutually assignable, ty now prefers the declared type, avoiding unhelpful Unknown inference while preserving useful narrowing.
Type checking now models short-circuiting control flow in Boolean expressions.
Contextual secondary annotations are now included in more places.
Checks are skipped for gradual vararg calls.
Lambda parameter types are now inferred from Callable type context.
Unions of parameter types are deferred.
[*xs] is now treated as an irrefutable pattern when matching on Sequence.
Dict-literal assignments now support ** unpacking of TypedDict values.
Signatures now support Unpack[TypedDict] in **kwargs.
Uses partially qualified names when reporting diagnostics about bad calls to methods.
Merges same-file annotations when only a single line separates them.
Allows if statements in TypedDict bodies.
Completion results rank symbols from typing and collections above third-party re-exports.
dataclass_transform metadata is inherited from metaclass bases.
“Rule xyz is enabled”-style hints are hidden unless verbose mode is specified.
LSP diagnostic messages now show info subdiagnostics.
The str constructor is no longer special-cased.
Partially stringified type annotations such as type["MyClass"] are supported.
Infers lambda expressions using Callable type context.
Supports dataclass field converters in type checking.
Diagnostics in unreachable code are unconditionally silenced.
Adds narrowing support for extended walrus targets.
Emits reveal_type diagnostics in unreachable code.
Infers types for yield expressions.
Discovers dist-packages in /usr/local/lib on Debian and Ubuntu.
The error code is ignored by default after errors for possibly missing submodules were split into a separate code.
Supports enum member access through enum instances and members.
Eagerly narrows types associated with keys even when a dict literal is a subexpression inside list or tuple literals.
Subtypes of LiteralString can be narrowed using equality checks.
None is promoted to None | Unknown in invariant contexts.
The installer prefers downloading releases from Astral's mirror over GitHub.
Infers t | {"foo": int} as TD when t is an instance of a TypedDict with a foo: int key.
Adds a diagnostic when a
TypeVarspecializes aParamSpec, or aParamSpecspecializes aTypeVar.Supports narrowing in ternary expressions.
Adds partial support and validation for Unpack when used with tuple types.
Reduces the threshold for upcasting
Literaltypes in unions to nominal-instance types when the union is recursively defined.Adds basic type narrowing for mapping patterns in
matchstatements.Renders subdiagnostics when
--output-format=githubis specified.Diagnostics are less verbose for classes with many abstract methods.
Test-related symbols from non-first-party packages are excluded from auto-import completions.
A bytes-literal type is now treated as a subtype of a Sequence of its constituent integer values.
Configuration paths now support shellexpand.
For pathologically large control-flow graphs, all code paths are treated as ambiguously reachable.
Bit-shift operations on integer literals now infer more precise types.
Calls to intersection types are now supported.
Interpolated f-strings composed of LiteralString values are now inferred as LiteralString.
A call to a generic function returning Never now terminates control flow.
String-literal arguments can now match an Iterable parameter during type variable inference.
Narrowing is now supported from a Callable type returning a TypeGuard type.
Includes conditional symbols such as datetime.UTC in auto-import in more cases.
Performs control-flow analysis in loops, allowing ty to account for loop control flow when checking types.
Ranks deprecated names lower in auto-import completions.
Uses os.name checks as the basis for type narrowing and reachability analysis.
Includes overload declarations in find-references results.
Allows dependency discovery in system Python environments.
Applies workspace settings to virtual files.
The attribute narrowing condition is relaxed to support deeper-nested attribute type narrowing.
The checker now narrows chained operators.
Comparison methods such as
__gt__are supported when a parameter is annotated with a Literal type.Constrained TypeVar compatibility is supported across function boundaries.
Constructor argument types are now inferred using type context.
Recognizing
__dataclass_transform__adds support for SQLModel.Deprecated functions and classes receive lower rankings in LSP completion results.
Diagnostics are supported in newly created files inside neovim.
The checker narrows equality subscripts on either operand.
The checker narrows both left- and right-hand operands where possible.
The checker now supports partially specialized type context.
When no environment is found, ty falls back to
python3found in$PATH.Invalid-argument-type and invalid-assignment diagnostics now include a hint when a variable is annotated with a type from the
numbersmodule.Infers ParamSpec from class constructors for callable protocols.
Rename operations now include property setters and deleters.
Self-referential imports are allowed outside the global scope.
The
./srcsearch path is added only when./src/__init__.py(i)does not exist.A single ty LSP server instance can support multiple workspace folders.
Type inlay hints are suppressed for assignments whose names begin with an underscore.
Supports dict literals and dict() calls as default values for parameters with TypedDict types.
Infers that TypedDict types with at least one required key are always truthy.
Adds support for starred unpacking in class bases.
Adds bidirectional inference for comprehensions.
Adds basic type-checking support for overloads in ParamSpec.
Shows the final search path instead of “and 1 more paths”.
Adds narrowing for bool and byte subscripts.
Adds narrowing for negative subscript indexing.
Allows
...as a default value for any parameter when the function is in anif TYPE_CHECKINGblock.Supports
if type(x) is Ynarrowing for types other than class-literal types.Adds right-hand-side narrowing for
if Foo is type(x)expressions.Groups
type[]elements together when displaying union types.Adds type-checking support for classes created dynamically with
type().Supports assignment to unions of
TypedDicts.Completion ranking is improved based on origin and exact match.
Top-level module symbols are ranked above most other symbols.
Adds support for explicit markdown code fences in docstring rendering.
An include entry for a file without a Python extension, such as myscript, now causes that file to be checked.
Sorts keyword argument completions higher.
Inference now accounts for subtyping, allowing an assigned list literal to infer list[int] when the variable is annotated Iterable[int].
Treat __setattr__ as fallback-only during type checking.
Type checking now narrows tagged unions of tuples when one tuple element has a Literal type.
Type aliases are no longer eagerly expanded via type mappings when unnecessary, so displayed bound-method signatures retain aliases.
Type checking now narrows tagged unions of TypedDicts in match statements.
Type checking now narrows TypedDict unions with not in.
Type checking now supports typing.TypeGuard.
The LSP server detects completion context better when typing in decorator positions.
Supports tuple narrowing based on member checks.
Includes a generic TypedDict's specialization in its display.
Uses Markdown for completions documentation when the LSP client supports it.
Narrows tagged unions of TypedDicts.
Prefers declared types only in non-covariant positions.
The possibly-missing-imports diagnostic is disabled by default.
Type narrowing is now applied to len calls based on the argument size.
The LSP server improves how signatures are rendered in hovers.
Type checking infers TypeVar specializations for Callable types.
Type checking infers more precise types for isinstance calls involving type variables.
This first Beta release is recommended for motivated users to use in production.
Tooling 117
Invalid dataclass __post_init__ signatures are reported by a separate rule.
Hover now shows field docstrings for constructor keyword arguments.
Subsequent checks filter diagnostics matching the baseline from CLI output and show them as hints in the language server.
Abbreviate large nested tuple types in diagnostics and inlay hints.
Point to the expression that makes a type alias invalid, even when the alias is imported.
The LSP server can provide return-type inlay hints.
ty supports uv's nested module ownership metadata.
Reports assignments to individually frozen Pydantic fields.
Improves the display of distinct string literal types.
The LSP server shows documentation for annotation operators on hover.
The LSP server completes string keys from dictionary initializers.
Improves diagnostics for async generator stubs.
Improves primary diagnostic annotations for redundant-condition and redundant-condition-strict diagnostics.
Adds rules detecting suspicious uses of Callable, Iterable, Iterator, or Generator types in a boolean context.
Expands unreachable-code annotations for redundant conditions.
Preview CLI watch mode watches script dependencies.
The language server watches script dependencies.
LSP can find member references across files.
LSP can find parameter references across files.
Rules add subdiagnostics warning about reachability implications.
Diagnostics for unimplemented abstract members are clarified.
Diagnostics annotate unreachable code caused by boolean operands, and annotations extend to while, assert, and match statements.
An autofix is added for unused awaitables.
Suggests variable-length tuple annotations for redundant conditions.
Adds Find references support for pytest fixtures.
Checks direct dependencies in PEP 723 scripts.
Synchronizes PEP 723 script environments in the language server.
Highlights PEP 723 script metadata as TOML in the LSP server.
Moves script environment initialization to the CLI and LSP.
More diagnostics have autofixes available.
The CLI can initialize environments for PEP 723 scripts.
The LSP server supports Go to Definition for pytest fixtures.
The type checker resolves fixtures through conftest.
Highlights declarations in invalid-assignment diagnostics.
Improves LiteralString suggestions in string annotations.
The type checker now models context managers that suppress exceptions.
ty diagnoses invalid __getattribute__ calls.
ty diagnoses invalid descriptor __get__ calls.
ty diagnoses invalid __getattr__ calls.
The checker suggests closing open TypedDict types to make them compatible with Mapping.
ty detects when these methods do not return awaitables.
ty improves the error context reported for incompatible callable signatures.
The LSP server indexes with-statement targets as symbols, making them available to symbol-based language features.
IDE features now support comprehension walruses.
Adds a lint rule for combining abstract and final decorators.
The CLI now discovers uv workspace roots.
ty warns about extra arguments that are immediately discarded by Pydantic.
Improves the diagnostic context for protocol attributes.
Adds assignability context to upper-bound diagnostics.
Adds typeshed stub support for builtins.sentinel.
Adds a go-to destination for Divergent in the LSP server.
The LSP server suggests keyword-only arguments between variadic parameters.
Adds the missing-type-argument lint rule to report missing type arguments.
The LSP server now shows a type alias's value on hover.
Hovering over a keyword-passed argument name displays documentation for its matching parameter.
ty_extensions now uses TypeForm.
Diagnostics now include a subdiagnostic help message about incompatible variance.
Hovering over an inline literal string in an IDE now shows LiteralString.
The LSP server now classifies property declarations in semantic tokens.
The LSP server adds a Quick Fix to remove redundant casts.
Adds TypedDict key completions in incomplete, anonymous contexts.
The LSP server classifies TypeVar semantic tokens as type parameters.
The language server now emits folding ranges for multi-line block headers.
JUnit diagnostics now include severity.
The LSP server now supports Annotated metadata in semantic tokens.
The LSP server now provides hover support for PEP 695 type aliases.
The LSP server suggests string literals based on the expected type.
The LSP server supports Go-to Definition, Go-To Declaration, and Find References for these initializers.
Attribute assignment diagnostics now include error context.
Detects invalid overrides between ClassVar and instance attributes.
Diagnostics now include error context for invalid-return-type.
Diagnostics now include error context for invalid-yield.
Keyword argument inlay hints can now be baked into source code.
Go-to definition is now supported for literal enum members shown in inlay hints.
Improves error diagnostics for assigning TypedDict values to dict.
Shows error context for assignability diagnostics.
The LSP server dims unreachable code in IDEs.
Syntax highlighting of call arguments uses the expected kind of object for the parameter.
Pedantic lints about badly named types are more consistent.
Semantic tokens now use type-form syntax highlighting for type alias values in IDEs.
LSP support for TypedDict constructors is improved by synthesizing __init__.
The LSP server shows a class's constructor signature when you hover over the class.
Diagnostics for reassigned Final variables now show where the variable was declared as Final.
Unused bindings are greyed out in the editor.
Adds support for typing.Concatenate in type checking.
Adds a diagnostic hint for invalid assignments involving invariant generics.
Adds precisely typed overloads for TypedDict update.
Clarifies that
from __future__ import annotationsonly stringifies type annotations.Provides more precise types for an enum's
nameandvalue.Adds a lint rule for invalid enum member annotations.
Adds a diagnostic for an unused awaitable.
Adds a diagnostic for combining Final and ClassVar.
Adds a diagnostic for invalid class patterns in match statements.
Adds hover and go-to-declaration support for subscript literals in the LSP server.
Adds an autofix that moves
Generic[]to the end of the bases list.Return-type inference for
struct.unpackis now more precise.Adds a diagnostic when a variable is declared as
Finalbut never has any bindings.Adds a diagnostic for invalid dataclass field orders.
Detects invalid
isinstance()andissubclass()calls against TypedDict classes.Adds a diagnostic for overridden comparison dunder methods on ordered dataclasses.
Validates signatures of dataclass
__post_init__methods.The diagnostic can suggest using
listinstead ofList.Adds a diagnostic for failed assert_type() calls where the actual type is a subtype of the named type but cannot be spelled in a type expression.
Invalid assignment diagnostics now provide type context.
Generic
Callabletypes now include type parameters in their display.Adds a diagnostic to catch generic enums.
Adds diagnostics for argument mismatches in
__init_subclass__.Adds type-checking support for functional
namedtuplecreation.Adds diagnostics that validate
TypeIsandTypeGuarddefinitions.Offers completions for T when a value has type Unknown | T.
Adds type-checking support for @total_ordering.
The LSP server now provides autocomplete suggestions for keyword arguments in class statements.
Adds a dedicated diagnostic for TypedDict deletions.
The LSP server classifies docstrings in semantic tokens for syntax highlighting.
The LSP server now supports attribute docstrings.
The LSP server improves syntax highlighting of constants.
The LSP server improves highlighting of special type syntax in hovers.
Fixes and other changes 959
Fixes a hang when specializing generic constructors.
Isolates uv-managed scripts from the project environment.
Synchronizes script environments when opening a file with diagnosticMode set to openFilesOnly.
Fixes variance inference for frozen Pydantic models on Python 3.12 and earlier.
Prevents stack overflow while checking a generic base initializer.
Preserves fixed parameters when comparing gradual callables.
Preserves compatible overloads when partially binding a union argument.
Checks fixed prefixes when assigning ParamSpec callables to gradual Concatenate.
Resolves script file settings independently of uv.
Ignores type context when inferring assert_never arguments.
Avoids preferring inferred attribute types during call inference.
Fixes stale diagnostics when diagnosticMode is set to workspace.
Keeps the language server responsive when its worker queue fills.
Checks protocol member names before specializing the source interface.
Imports are updated when Python package folders are renamed.
Preserves the type context kind when propagating it to nested expressions.
Reuses unpacked field types across TypedDict union candidates.
Skips discarded TypedDict validation diagnostics during union matching.
Completion works after an alias in a parenthesized import.
Class objects are narrowed in equality and membership checks.
Implicit __hash__ = None is respected when a class defines __eq__.
Literals outside a protocol are preserved when simplifying unions.
Infers value types for bare Final and ClassVar.
Fixes a panic that occurred when checking class decorators with inferred return types.
Respects return constraints when promoting literal arguments.
Infers nested classes as read-only attributes.
The LSP server resolves pytest fixtures registered through pytest_plugins.
Preserves inherited value types on repeated bare ClassVar annotations.
Avoids spurious syntax warnings when applying fixes.
Preserves excluded types when inferring type variable upper bounds.
Callable-local type variables are kept out of enclosing constraints.
Descriptor write contracts are preserved in overrides and protocols.
Inference no longer runs away for nested calls with union parameters.
Inferring calls that return recursive aliases no longer causes a stack overflow.
Simplifying recursive wide unions no longer panics.
Unary operators on bounded type variables preserve
Self.Field specializations are no longer narrowed to expanded unions.
Falls back to a workspace-wide watch when file watcher registration fails.
Records exception checkpoints for nested unpacking targets.
Preserves Pydantic strictness through PEP 695 type aliases.
Avoids a panic when checking unions of recursive named tuples.
Preserves the element type when a tuple is passed as a callback.
Preserves distinct bytes keys during narrowing.
Inlay hint edits are offered only for valid annotation targets.
Fixes partial application of ParamSpec decorators.
Explanations now describe why a rule was removed in configuration and ignore comments.
Aliased conditions are invalidated across loop iterations.
Output errors are handled when generating shell completions.
Call argument validation is fixed for variadic parameters.
Comparisons of wide builtin literal unions are bounded.
Preserves baseline matches when a rule is renamed.
Fixes exhaustiveness analysis for class patterns after class identity checks.
Prefers active unnamed Conda and Pixi environments, and skips them during discovery when they don't contain Python.
Fixes handling of conditional types and tuple annotations.
Configuration deserialization no longer fails on conflicting rule names.
Preserves exception types after tuple truthiness checks.
Retains all successful generic call narrowing attempts.
Inferred bytes literals are capped in size during concatenation.
Fixes a panic when expanding outgoing calls in the call hierarchy.
Decorators that replace overrides of final methods are handled.
Django ForeignKey fields are supported as primary keys.
Django OneToOneField fields are supported as primary keys.
Extra-field configuration is respected on Pydantic settings models.
A cycle iteration cutoff is applied across type inference.
Narrowed type variables are preserved in union inference.
An empty VIRTUAL_ENV is ignored.
Hints remain display-only when later positional arguments or *args follow, or when inserting them would create duplicate or invalid keywords.
Resolves class-local names in generic type aliases.
Progress bars now honor color overrides.
Preserves Pydantic field metadata in quoted annotations.
Avoids false redundant-cast diagnostics when casting the result of a generic call.
Fixes a panic when checking protocols involving runtime type aliases.
FORCE_COLOR is respected even when output is piped.
Parenthesizes assignment and generator expressions in argument hint edits.
Uses a trailing ParamSpec default after a TypeVarTuple.
Rejects out-of-scope type variables in PEP 695 pack defaults.
Fixes self-comparison during recursive protocol materialization.
Detects traversal budget exhaustion in products of lower bounds.
Accepts keyword arguments for the name and value parameters.
Accepts another unpacked TypeVarTuple as a default.
Places variable type inlay hints after grouping parentheses.
Prevents a panic on a chained assignment with a missing value.
Prevents a panic when a comprehension filter depends on a later binding.
Prevents a panic when sorting diagnostics that have no source location.
Suppresses invalid-override errors for Django Meta configurations.
Fixes startup on older Linux x86-64 kernels.
Stop synthesizing primary keys for abstract Django models.
Fix narrowing of strings and integers compared with enum members.
Preserve generic callback specializations during return refinement.
Preserve narrowing after guarded match subject captures.
Preserve string literals in comparisons with
LiteralString.Preserve mapping capture types on narrowed subjects.
Preserve caller type variables during nested union inference.
Honor
@overrideon overload implementations in stubs.Combine constraints from repeated ParamSpecs during type checking.
Fix a hang that could occur when negating recursive unions of instance types.
Fix a panic that could occur when checking truthiness in a loop.
Remove covered exclusions from unions.
Infer Django foreign key <field>_id types from the referenced field.
Recognize get_<field>_display() on Django model fields with choices.
Recognize get_next_by_<field>() and get_previous_by_<field>() on non-nullable Django date and datetime fields.
Preserve generic callback parameters when forwarding overloaded functions through a ParamSpec.
Generic calls with an intersection argument now prefer a more precise solution when safe.
Checks for unsatisfiable bodies before existentially quantifying during generic solving.
Avoids false-positive diagnostics when constrained type variables are inferred from callbacks returning invariant generics with gradual type arguments.
Avoids cancelling requests for unrelated file changes.
Preserves module-discovery fallback when a partial stub package obscures the namespace-package fallback.
Reports all missing @override decorators together.
Fixes stack overflows involving recursive descriptor setter types.
Fixes recursive type materialization.
Return intersections are inferred from correlated call specializations.
Preserves Self when checking universal protocols.
Constructor type variable defaults are deferred.
Recursive descriptor setter checks no longer cause stack overflows.
Read types are preserved for dynamic attributes.
Subclasses can restore hashability when a base class is unhashable.
Negating recursive aliases no longer causes crashes.
Strict signature checks preserve bound receivers.
Keyword arguments to TypeAliasType are validated.
Incompatible union members are filtered during union inference.
Avoids a panic when negating dynamic type aliases.
Reports invalid Generic and Protocol arguments containing nested variadic type variables.
Tuple literal lengths are widened when other collection elements contain nested tuple types.
Fixes checks through bounded or constrained type variables.
Preserves inherited annotations for unannotated subclass attributes when a base has type Any or Unknown.
Detects conflicts hidden by additional base classes.
Improves type inference for intersection arguments to generic functions.
Fixes false errors when overriding object attributes.
Preserves known module owners when uv reports owners outside the resolution.
Preserves common return-type structure when gradual arguments match multiple overloads.
Fixes false missing-argument errors when Pydantic models override inherited attributes with ClassVar.
Avoids panics and hangs involving recursive type aliases and intersections.
Checks upper bounds when inferring type variables from caller type variables.
Identical argument type diagnostics are deduplicated.
Suppression of attribute override diagnostics is respected.
Notebook cell lookups work correctly after cells with cell magics.
Notebook cell positions are clamped to the end of the cell.
Fixes a panic when requesting completions past the end of a notebook's last cell.
Type checking now checks overrides of receiver attribute declarations.
Infers the default for definitely absent keys in closed TypedDict.get calls.
Preserves minimum lengths when unpacking tuple unions.
Unpacking a variable-length argument leaves room for later positional arguments.
Fixes a deadlock when LSP requests arrive before workspace configuration.
Recursive structure in
Annotatedvalues is preserved.The CLI always shows fixes.
Dependency metadata is invalidated when environments change.
Literal types are preserved when dictionary literals are consumed.
Exact exclusions are checked before intersection positives.
Final attribute restrictions are preserved on composite types.
Non-boolean comparison results are preserved for intersections.
Tuple unions are narrowed through truthiness and type checks.
Unicode support is updated to Unicode 17.
Uninhabited truthiness is represented explicitly.
Receiver specializations are preserved when calling unions of bound methods.
Validity type context is solved through constraint sets.
Preserves constrained type-variable failure diagnostics.
The LSP server avoids stale I/O diagnostics when a deleted file is closed.
Avoids reporting disjoint-cast diagnostics when the value could have been inferred as compatible with the cast type using the right type context.
Fixes a stack overflow when inferring dynamic class metaclasses.
Fixes type variable inference for final class objects.
Passes generic context to the call inference solver.
Preserves generic inference errors during diagnostic recovery.
Honors generic property setters when checking protocol compatibility.
Fixes include and exclude pattern anchoring after the project root changes.
Narrows later match cases after guards that are always true.
Bounds how nested callable signatures are displayed in diagnostics.
Validates union operands involving None.
Compares observable notebook state for equality.
Detects recursive alias cycles through intersections.
Avoids panics involving recursive lambda class decorators.
Improves display of string literal types containing Unicode characters or double quotes.
Preserves tuple shapes when slicing NewTypes.
Preserves tuple subclass identity during type expansion.
Recognizes bare TypeVarTuples in materialization checks.
Fixes member lookup on union-bounded type variables.
Metadata errors explain when the uv version is outdated, and uv metadata diagnostics are improved.
Preserves call narrowing during cyclic inference.
Fixes disjointness checking for generic class types.
Only reachable definitions are considered when deciding whether conditions defined relative to version, platform, OS, or type-checking state should be exempted.
Fixes stale LSP diagnostics after toggling this setting.
Fixes staticmethod shadowing through generic receivers and unions.
Preserves intersections of type guard return types.
Avoids incorrect simplification of TypeIs materializations.
Preserves inferred bindings during annotation cycles.
Represents bound methods more faithfully.
Respects fixed caller type variables when selecting constraints.
Classifies evidence bounds only for constrained type variables.
Points each misplaced tuple ellipsis diagnostic at the corresponding ellipsis.
Preserves fast name filtering for normalized Unicode source.
Preserves PEP 695 bindings across nested classes.
Preserves quoted aliases during cycle recovery.
Fixes hangs caused by repeated partial application.
Avoids leaking Unknown from unconstrained collection use-sites.
Diagnoses unguarded cycles in implicit and PEP 613 aliases.
Simplifies unions of disjoint exclusions.
Refreshes diagnostics after workspace configuration changes.
Declared variance is checked against final method bindings.
Field metadata is preserved after overload resolution.
Overrides of frozen=False on Pydantic subclasses are respected.
The disjointness of functools.partial types is improved.
Valid LSP settings are preserved when configuration resolution fails.
Recursive protocol checks work for decorated methods.
Gradual tuple lengths are preserved during callable inference.
Tuple shapes are preserved during concatenation.
The CLI skips uv workspace metadata only for a single script.
Dependencies are resolved within correlated inference alternatives.
Descriptor detection now ignores divergent markers.
Type checking avoids rebinding extracted method calls.
Fixes MRO ordering for generic bases.
Glob characters in anchored directory paths are now escaped, preventing them from being interpreted as pattern syntax.
Type checking now handles gradual metaclass ancestry and conflicts.
Nominal descriptor checks preserve wrapped signatures.
Explicitly overridden constructor signatures are validated.
Union transformations preserve recursive metadata.
Type checking respects instance dictionary storage for slotted classes.
Narrowing tagged unions preserves runtime comparison semantics.
Fixes reduction of variadic partial signatures.
Fixes cached classmethods on generic classes.
Preserves callable identity across specialized types.
Fixes exclusion of directories when an ancestor is excluded.
Preserves wrapped functions in precise functools.partial relations.
Prevents the LSP server from hanging during bursts of inlay hints.
Preserves metaclass candidates after conflicts.
Unwraps union alternatives in overload implementations.
Preserves callback type context through ParamSpec forwarding.
Preserves redundant-condition diagnostics when operands are unreachable.
Respects the descriptor protocol for __set__ itself.
Fixes disjointness between type guards and boolean literals.
Respects type-variable bounds in argument context.
Checks captured receivers when calling wrapped classmethods.
Adds assert_never fixes for redundant final elif branches.
Adds await fixes for diagnostics about redundant conditions.
Preserves deprecations on decorated callables.
Avoids panics when typing is shadowed in dict keyword calls.
Solves formal unions using constraint-sets.
Preserves gradual type context during generic call inference.
Ensures f is identity(f) evaluates to Literal[True].
Recovers cycles when constructing known class instances.
Discovers configs in models derived from legacy generic classes.
Adds Literal fixes for diagnostics that flag invalid type annotations.
Promotes literals in nested, non-covariant positions.
Fixes callable specialization with union-valued ParamSpec.
Preserves outer type variables during ParamSpec inference.
Preserves protocol intersections when narrowing gradual types.
Declares support for Python 3.15.
Normalizes recursive collection-use constraints.
Preserves nominal subtyping for top-materialized protocols.
Avoids falling back to Unknown when collecting type context constraints.
Aligns TypeIs narrowing with isinstance narrowing.
Captured bound-method receivers are treated covariantly.
Cyclic intersection simplification is deterministic.
Terminal-call reachability in cyclic cases is stabilized.
Diagnostics are deferred to avoid recursive-default cycles.
Deprecation diagnostics respect overload selection.
Generic protocol materialization relations are preserved.
Unsound intersection simplification for generic iterables is fixed.
Type variables are respected in top/bottom materializations.
Negative narrowing is fixed for protocols with gradual members.
Bindings inferred against type context are preserved.
Uncertain branches are preserved during quantification.
Type variable scopes are validated in constructors and aliases.
Condition truthiness is stabilized during cyclic inference.
Recursive protocol traversal in generic intersections is now bounded.
Generic receivers are preserved in implicit __init_subclass__ calls.
Deletions are propagated through nested loop headers.
Recursion guards are preserved across nested type operations.
Removing redundant casts now preserves syntax and comments.
Specialization is preserved for inherited TypedDict methods.
Fixes a panic in auto-completion involving bare declarations.
Preserves type variables in bounded generic defaults.
Preserves inferred types for unknown class-decorator results.
Validates declared variance in method signatures.
Preserves Final variance in stubs.
Narrows functional enum members in equality comparisons and match statements.
Fixes Goto definition behavior in script dependencies.
Uses the subclass receiver when checking method overrides.
Applies mixin specialization when validating enum members.
Avoids panics on incomplete protocol type parameter lists.
Guards recursive meta-type expansion.
Preserves parentheses when removing redundant casts.
Synchronizes saved script metadata on open.
Binds Self through generic type aliases.
Preserves short-circuit reachability for direct conditions.
Preserves list literal positions in starred unpacking.
Narrowing through branch-assigned conditions is made sound.
collections.abc.Callable is recognized as an instance of type.
Equality inference accounts for known subclasses.
Correlated generic-call inference is preserved.
Generic protocol variance is validated.
Invariant materialization constraints are preserved.
Bounds of non-literal metaclasses are preserved.
Inconsistent binding decorators on overloads are ignored.
PEP 723 script environments are refreshed in watch mode.
The type checker resolves imported pytest fixture exposures.
The type checker resolves fixture providers installed by core pytest.
Bounds of Self are specialized for inherited methods.
Self binding in ParamSpec protocols is corrected.
Diagnostics explain missing storage for declared slotted attributes.
Variance inference for TypedDict is corrected.
Bare TypeVarTuples are recovered in tuple annotations.
Diagnostic spans are improved for unpacked variable assignments.
Send and return types are inferred from the iterator returned by __iter__.
Recognizes ABC metaclass methods on protocols.
Uses invalid-type-form for annotations of non-generic classes.
Preserves string annotation context in lambda defaults.
Avoids duplicate bindings in multi-target assignments.
Skips scripts whose PEP 723 configuration is invalid.
Fixes stack overflow during recursive TypedDict dictionary compatibility checks.
Propagates narrowing through statically known branches.
Prevents panics on unpacked kwargs and handles assignment expressions and dynamic classes in string annotations; also skips invalid subscript arguments and operands.
Prevents stack overflow when checking recursive TypedDict dictionary compatibility and preserves string annotation context in TypedDict types.
Preserves keyword safety when checking unpacked callables.
Fixes how variadic signatures are displayed.
Handles file-valued workspace folders sent by Zed.
Several diagnostics now disambiguate types that share the same name.
Preserves declared types in exception handlers.
Preserves variadic generics when checking functools.partial.
Generated constructors now preserve required fields from stubs.
Preserves explicit globals after conditional rebinding.
Preserves static upper bounds of gradual solutions.
Specializes inherited members of unspecialized generic classes.
Preserves class objects during lazy protocol checks.
Expands nested union aliases when looking for a TypedDict or callable.
Preserves property subclass types and accessors during type checking.
Errors originating in script metadata now show error spans.
Fixes signature help when the cursor is in trailing whitespace.
Preserves the runtime origin of TypeAliasType.
Assignability hints are improved for protocols and TypedDict types.
Augmented assignments are no longer treated as attribute definitions.
Overload argument expansion works correctly with unpacked positional arguments.
Pydantic accepts documented boolean and fractional inputs.
Generic declaration metadata is ignored in staticness checks.
Tuple types containing Never are preserved.
Generic TypedDict aliases are specialized correctly.
Variance is respected when inferring structural and callable types.
ty validates boolean conversion in comprehension filters.
ty preserves constrained TypeVar types when slicing.
ty handles class objects that may be descriptors.
ty preserves enum attributes on Self and bounded type variables.
ty preserves enum exhaustiveness when enums define custom _missing_ methods.
ty restricts equality-impossibility conclusions to static bounds.
ty resolves generic type aliases subscripted inside type[].
Type narrowing no longer introduces boolean literals when narrowing integers.
ty respects third-party keyword-only fields when running on Python versions before 3.10.
ty preserves literal-string origin during comparison narrowing.
ty fixes truthiness inference for subclassable known classes.
ty validates the shapes of unpacked callable arguments.
Validates stores made by augmented assignments.
Contextual inference is preserved for declarations in loops.
Generator aliases are expanded when evaluating return, send, and yield types.
Recognizes overlapping NewType types and their underlying values.
Quantified constraints are excluded from semantic type walks.
Fixes signature help when the cursor is at the end of a file.
Type labels in structured docstrings are normalized.
Typing-only completion ranking is preserved in TYPE_CHECKING blocks.
Infers precise truthiness for TypedDict key-membership checks.
Avoids a deadlock when scheduling watch checks.
Fixes a panic caused by mismatched OR-pattern bindings.
Property getter call errors are preserved in diagnostics.
Restores bottom callable subtyping for gradual prefixes.
Property compatibility is checked when matching class objects to protocols.
Fixes constructor calls on narrowed type-variable intersections.
Validates constructor calls on unbounded type variables.
Fixes a specialization cycle involving deferred TypeVar defaults.
Typing-only symbols are retained in explicit completions.
Preserves generic class type variables in constructor inference.
Recovers generic constructor types from failing overloads.
Preserves class type parameters through generic decorators.
Preserves called types in intersection diagnostics.
Top-materializes the is_dataclass type guard.
Match-pattern bindings are indexed as symbols.
Preserves return constraints for object-variadic callables.
Preserves return constraints for top callables.
Suppresses these diagnostics in stub files and if TYPE_CHECKING blocks.
Normalizes unpacked callable signatures for assignability.
Fixes unused hints for captures in OR-patterns.
ty preserves exact numeric types in covariant collections.
ty diagnoses dataclass fields that follow inherited defaults.
ty fixes assignability for enum class containers.
ty preserves diagnostic sources when forwarding expanded-variadic diagnostics.
ty respects bounds and constraints in generic materializations.
ty avoids over-materializing user-defined TypeIs return types.
ty preserves TypeVarTuple context during Generic recovery.
Preserves type inference when constructor overloads are filtered.
Diagnostics now recover the source locations of forwarded callable objects and constructors.
Preserves setter delegation for frozen dataclasses.
Diagnostics now recover source locations for forwarded functools.partial calls.
Fixes gradual class assignability when generic receivers are involved.
Corrects the reported locations for forwarded-argument diagnostics involving ParamSpec.
Tagged unions are now narrowed through all type kinds.
Improves identity comparison inference for singleton types.
Fixes identity narrowing for NewTypes.
Implicit setter calls now reuse full call diagnostics.
Fixes the rule's suggestion for Python versions before 3.12.
Avoids cycles when resolving
ModuleTypeglobals.Decorates only overload implementation signatures.
Preserves receiver constraints when binding overloaded methods.
Fixes hover and type navigation for ParamSpec declarations in the LSP.
Makes reachability analysis idempotent.
Preserves
Selfin__new__calls.Narrowing tagged unions now accounts for identity comparisons.
Improves inference for tuple membership and rich comparisons.
Models walrus bindings created by comprehensions.
Fixes double specialization of generic type aliases.
Fixes handling of intersections between type and TypeForm.
ty handles generic stringified PEP 613 type aliases.
Respects bounded typevars during union inference.
Fixes reachability analysis for
Callableisinstancechecks.Preserves constrained TypeVar equality narrowing.
Preserves constrained TypeVar inequality narrowing.
Recovers from cancelled file indexing.
Preserves unsatisfiable generic call constraints.
Avoids editing ignore comments that have trailing reasons.
Checks inherited method conflicts via the MRO.
Fixes protocol matching for
Just[float].Improves reachability inference around value-pattern branches.
Makes membership and equality narrowing consistent.
Respects metaclass
__setattr__when checking class attributes.Respects
rulesandanalysisin PEP 723 script metadata configurations.Guards recursive Protocol and TypedDict relations.
Prevents stack overflows in recursive type relation checks.
Fixes
Selfbinding for classmethod__new__constructors.Fixes nested short-circuit flow snapshots.
Avoids recursive TypeVarTuple alias expansion.
Avoids extending own-line suppressions when using this option.
Method override checking respects receiver domains for mixins.
Avoids recursive structural comparisons when checking protocols.
Narrows the inferred values of walrus expressions.
Constraints from bound receivers are preserved during type checking.
Prevents types written with a code span from being incorrectly re-wrapped during docstring Markdown rendering in the LSP server.
PEP 695 aliases are resolved in
type[...]annotations.Avoids recursive protocol union redundancy checks and handles recursive protocols in redundant-cast checks.
Sequence pattern narrowing is retained in successful
matchcases.Transparent callable workarounds now support overloads and Awaitable[T], and are treated consistently in class assignments.
TypeGuard keyword arguments are narrowed, and the
invalid-type-guard-calldiagnostic is removed.Dataclass field-order checks now respect init=False.
Guard descriptor classification against cycles.
Corrects how tabs are expanded in docstrings by the LSP server.
File check eligibility no longer causes broad invalidation in the LSP server.
Resolves parsing ambiguity in favor of observations from popular projects.
ParamSpec callables are exempt from the dunder descriptor heuristic.
Corrects receiver binding for protocol methods.
Self is now bound in implicit dunder calls.
Avoid duplicate diagnostics for overloaded TypeIs.
Transitive TypeVar artifacts are removed during collection inference.
Adds support for cached properties in protocols.
Handles callable classes in the type-checking solver.
Infers ModuleType.__doc__ as str when a docstring is present.
Fixes protocol matching for class variables.
Treats ellipsis as providing no default value.
Recognizes fields from Pydantic mixin classes.
Fixes float conversion in Pydantic unions.
Fixes reflected binary dispatch for runtime classes.
Respects user stub overlays during module resolution.
ty now detects async generator expressions containing await.
Generic signatures are preserved for functools.partial.
Invariant materialization is preserved on generic specializations.
Generic variadic callback semantics are preserved.
Exhaustive gradual match patterns are preserved.
reStructuredText hyperlinks in hover docstrings are rendered as Markdown.
Narrowing now handles intersections containing an invalid member.
Literal enum member names are preserved.
Fixes subtyping and assignability for @property protocol members.
Fixes LSP selection range behavior for strings.
Docstring parsing for signature help recognizes that dedent ends a doctest block.
Renaming an attribute now updates its string in __slots__.
Models normalization of int and str enum values.
Recognizes constructors for inherited enum members.
The CLI exits with status 130 when interrupted.
Avoids an MRO cycle when collecting NamedTuple fields.
Respects return-context inference when filtering overloads.
Prefers reflected operators according to the runtime class.
Enum alias detection and scalar constructors are corrected.
Positional class patterns are validated against __match_args__.
Import analysis skips shadowed submodule bindings.
Inference for structural pattern bindings is fixed.
Inference for variable-length tuple slicing is improved.
Supports basic usages of __class__ closure cells in methods.
Avoids duplicate configuration error output.
Improves class-pattern fallthrough analysis, proves TypedDict structural patterns exhaustive, and resolves positional class-pattern exhaustiveness.
Reuses equality semantics when checking membership compatibility.
Avoids stack overflows in reachability analysis.
Fixes divergent handling of recursive tuple cycles.
Fixes panics from relation queries during cycle recovery.
Fixes inconsistent token classification for type aliases in the LSP server.
Reverts recursive TypeOf cycle recovery to fix panics.
Handles TypeVar bounds over type[...] in attribute lookup.
Distinguishes typing.TypedDict from typing_extensions.TypedDict.
Fixes ParamSpec callable signature extraction for callable instances.
Preserves the regular kind for callable instances.
Avoids bypassing lazy constraints for Divergent, improving type-checking behavior.
Simplifies intersections of invariant generic types with Any specializations.
Avoids recursion when projecting narrowing constraints.
Makes multi-arm TypeOf cycle recovery monotonic.
Avoids showing shadowing hints for attribute assignments.
Its overloads now accept arbitrary keys when defaults are provided.
Recovers from cycles in dynamic class code generators.
Preserves gradual behavior for explicit Any subclasses.
Preserves generic alias identity during cycle recovery.
Preserves metaclasses when inheriting from intersection-typed bases.
Normalizes recursive protocol growth during cycle recovery.
Recursive TypeOf is normalized across multiple union arms and during cycle recovery.
Supports Annotated[Any, ...] as a class base.
Fixes recovery from cycles involving bound TypeVar defaults.
Preserves exact class objects during identity narrowing.
Preserves unpacking diagnostics for nested assignment targets.
Decorated methods are highlighted consistently in the LSP server.
Deprecated warning categories are validated.
The LSP server retains all diagnostic annotations.
Diagnostics for duplicate-base cases are improved.
Equality-based narrowing is improved for ==, !=, and match.
Bare Final is shown as a special form on hover.
Type variables are preserved in fixed tuple aliases.
Options in functional dataclass calls are supported.
Generic inference avoids leaking constraints across distinct TypeVars.
Non-final types are preserved in Hashable unions.
Equality narrowing works across IntEnum classes.
Literal types are preserved for loop variables iterating over literal collections.
The checker synthesizes __match_args__ for NamedTuple.
Function validation respects the @no_type_check decorator.
ParamSpec binding contexts are respected during type checking.
Negative narrowing is preserved for starred sequence patterns.
Tuple expression match subjects are narrowed.
Narrowing is preserved after qualified TYPE_CHECKING checks.
The LSP server reports the correct symbol range for wildcard imports.
Type checking for collection literals now uses peer context.
Preserves the nominal type of enum.property instances during type checking.
The diagnostic now points at the attribute's binding site.
Fixes a site-package error that occurred when multiple Python versions were installed in the system path.
Improves type-checking precision for TypedDict declarations using closed=True.
Preserves overloads through callable protocol decorators, improving type checking of decorated callables.
Avoids panicking when a recursive NamedTuple references a recursive NewType.
Fixes an out-of-bound panic in notebooks involving suppression comments.
Avoids a crash when hovering over Callable.
Improves support for enum.property.
Transparent callable decorators are now preserved.
Generic callable type variables are now represented by fresh copies.
Attribute lookup now preserves intersection receivers.
Preserves literal promotion when bounds are mixed.
Fixes divergence in recursive inference caused by ambiguous overloads.
Deprecation information is preserved on replacement functions.
The anchor point for override diagnostics is fixed, improving where diagnostics are reported.
ty no longer treats sys.implementation.version like sys.version_info, avoiding incorrect handling during type checking.
Dynamic class literals are normalized during cycle recovery.
File roots are registered for first-party search paths.
Disjointness is detected when generic specializations are incompatible.
Non-callable elements of an intersection call no longer inject Unknown into inferred types.
Nested
globalandnonlocalbindings are included in type inference.Variance inference for nested type aliases is corrected.
Error context is improved for not-iterable diagnostics.
Union-bound type variables are treated like unions for this diagnostic.
Slice-bound types are preserved in subscript inference.
Rejected member annotations are ignored when synthesizing bindings.
The same type alias is no longer needlessly disambiguated.
Type aliases are expanded inside unions in type contexts.
ty distinguishes
typing.Callablefromcollections.abc.Callableduring type checking.Detects recursive expansion during constraint-set solving.
Fixes narrowing of enum literal unions by member identity.
Extends the Generator assignability workaround to Python 3.13 and later.
Bound method overloads are narrowed by receiver during type checking.
The diagnostic for failed assignment to a Callable type is improved.
The editor setting completeFunctionParentheses is documented.
Avoids panicking when handling deferred dataclass field annotations.
Diagnostic messages are used as a tie-breaker when sorting, which can affect diagnostic ordering.
Diagnostics for syntax errors in forward annotations are improved.
Avoids panicking when a cycle occurs during function decorator inference.
Metaclass declarations are no longer treated as populated values.
The type checker now infers bool when not is applied to dynamic values.
Rejected assignments are ignored when processing synthesized bindings.
Class attributes assigned by metaclass initialization are inferred.
Many generics solver issues are fixed by using constraint sets more widely to solve type variables.
Diagnostics in ignored folders are fixed after adding new files.
Autocompletion works for elements inside incomplete list comprehensions.
Enum names are resolved for all union arms in Literal enum subsets.
Definition mapping from a stub file to its real runtime definition now follows aliases.
Recursively defined state is retained when analyzing binary expressions.
The fallback for unknown results from Callable class decorators is refined.
ty infers dict(TypedDict) as dict[str, object].
HTML syntax is escaped when the LSP server renders docstrings.
Type checking now allows enum member accesses on self.
Diagnostics for extra callable parameters now include error context.
ty avoids panicking when a class receives an __new__ assignment.
Synthesized class fields preserve declaration order.
Fixes global lookup in a class body before the class binding is available.
Fixes a panic involving enum literals during cycle recovery.
Fixes LSP find references for except handlers.
Preserves delimiters when folding expressions in the LSP server.
Allows known non-field writes on frozen dataclass subclasses.
Ignores
_generate_next_value_when enums use custom construction hooks.Ignores generic specialization when checking layout compatibility.
Fixes a panic when lazily expanding a NewType base during cycle recovery.
Preserves short-circuit bindings in all condition consumers.
Type checking now respects dict-compatible fallbacks in TypedDict unions.
Fixes async iteration over narrowed type variables.
Prevents a panic during disjoint base checks.
Prevents a panic during recursive binary inference.
Only specialized types of generic class instances influence variance.
Prevents a panic involving cyclic __new__.
Avoids enforcing __new__ when a custom metaclass is present.
Avoids unsound type narrowing for not-in checks.
Prevents a panic involving imported overload definitions.
Makes overload public type reachability-aware.
Preserves ParamSpec argument context through wrapper calls.
Prevents panics in reveal functions such as reveal_protocol and reveal_mro when called with keyword arguments.
Prevents a panic during double inference for a single starred positional TypedDict.
Fixes attribute access on TypeVars bounded by Callable.
Fixes assignment checks for ClassVar[Self] when the assigned value is a class object.
Go To-Definition now works for self-imported submodules.
The LSP server now respects the includeDeclaration request parameter.
Full iteration analysis now runs on narrowed typevars.
Returned Callable annotations preserve their lexical ParamSpec scope.
Fixes singleton classification for runtime typing objects.
Prevents a panic when static_assert is accessed without an args[0] value.
TypedDict keys are preserved through dict unpacking.
Prevents a panic when a TypedDict schema contains a cycle through Self fields.
Guards against self-referential TypeOf recursion in generic callables.
Walrus bindings are preserved through negated short-circuit conditions.
Prevents a panic when accessing a non-name walrus target.
Folding range starts are adjusted to preserve the visible header for character-precise LSP clients.
Type context is provided for boolean operands.
More precise exception types are used when catching a union.
Type context is provided for generator expression yields.
Implicit aliases preserve NewType and TypeAliasType.
Comparison between negative and positive literal integers is fixed.
Overloads are filtered based on return type for ParamSpec mapping.
ParamSpec specialization now works through unioned generic classes.
Support for recursive types is improved.
Infers dict(**TypedDict) in a TypedDict context.
Fixes unbounded type growth in nested type-variable substitutions.
Fixes ParamSpec defaults and alias variance.
Adds a missing error context node for protocol-to-protocol assignability diagnostics.
Prevents panics during recursive protocol signature comparisons.
Prevents string annotation tokens from leaking between notebook cells.
Reference finding now works in stringified annotations.
Prevents panics when invalid unpacking assignments contain syntax error targets.
Fixes TypeIs assignability with gradual types.
Unpacks Union of TypedDict in various sites.
Fixes incorrect unused reporting for annotation-only local variables.
Improves handling of finally blocks when all try and except blocks are terminal.
Improves generic solving for unions in invariant positions.
Improves generic solving for unions when matching against protocols.
Fixes go-to definition for generic classes.
Inlay hint edits are disallowed when they would introduce a non-global-scope symbol.
Invalid intersection type assignments now include error context.
invalid-key diagnostics now include the full type for unions of TypedDicts.
Duplicate invalid-type-form diagnostics for PEP-613 type alias values are removed.
Errors from context manager dunder methods invoked on a union now use more specific diagnostics.
Diagnostics for possibly-unbound errors from implicit dunder calls on unions are improved.
Diagnostics for implicit calls to a possibly unbound unary operator are improved.
Fixes selection of projects and workspaces.
Fixes receiver coloring when decorators are aliased.
Unresolved symbols are no longer given semantic highlighting.
Invalid TypedDict assignments now include error context.
Fixes notifications about watched changes for entities outside any workspace.
The LSP server no longer suggests argument completion while typing a keyword argument's value.
Prevents stack overflow when binary operator inference involves recursive types.
Avoids panicking on overloaded Callable type contexts.
A subclass of a @dataclass_transform-decorated class is not considered to have dataclass-like semantics if it has type in its MRO.
Fixes a panic when __get__ uses a Concatenate self-type and wraps a __call__.
When an @overload-decorated function has no docstring, the LSP server retrieves it from the overload implementation.
Expands class bases when performing per-base lint checks.
Prevents unnecessary ty:ignore comments from being inserted for diagnostics starting on the same line.
Avoids a panic from double inference when functional Enum calls omit names.
Avoids a panic from double inference for functional Enum calls using the value keyword.
Skips EnumMeta.__call__ when determining enum constructor signatures.
Fixes cases where the invalid-key fix does not converge.
Avoids a panic from double inference for namedtuple calls using these arguments.
Checks for inherited NamedTuple field conflicts.
Respects subclass shadowing for inherited NamedTuple fields.
Fixes cases where the diagnostic produces invalid syntax.
Reports an error when duplicate keywords are provided to TypedDict constructors.
Respects mixed positional and keyword arguments in TypedDict constructors.
Fixes assignability of bounded typevars to intersection types.
Callable types now render the
/parameter before*.Several edge cases in Concatenate type-expression parsing are tightened.
These diagnostics point to the first reachable declaration rather than the first declaration.
Final variable assignments in __post_init__ are allowed.
Goto definition returns all attribute definitions instead of only the last definition in the scope.
The diagnostic range for incorrect implicit __init_subclass__ calls is corrected.
Signature help is fixed for class calls specialized with ParamSpec.
Explicit None accessors in manual property construction are normalized.
Attribute deletion checks now respect property deleters.
Unsupported Python versions selected by the editor are ignored.
Stack overflows caused by recursive types are fixed.
Excess subscript argument inference for non-generic types is fixed; list[int][0] now leads to one diagnostic instead of two.
super() is supported in metaclass methods.
Nested conditional blocks now inherit the TYPE_CHECKING state of outer blocks.
Assignability of type[T] to a metaclass is corrected.
TypedDict field types provide context for inferring arguments passed to TypedDict constructors.
TypedDict unpacking now respects non-required keys.
TypeGuard and TypeIs narrowing for unbound method calls is fixed.
Core type checking respects metaclass __call__ return types.
ty avoids special-casing dataclasses.field when it is not listed in field_specifiers.
Core type checking respects __new__ return types.
ty respects supported lower bounds specified by requires-python.
PEP 695 type aliases are fixed when used in a with statement.
Bidirectional inference fixes false positives on operations such as multiplying a list containing None.
Diagnostics for invalid functional TypedDicts are improved.
Parsing invalid type expressions no longer emits cascading diagnostics.
Diagnostics relating to invalid type forms have improved consistency and quality.
The type checker handles most deep mutual TypeVar constraints.
Various type-qualifier-related checks are more robust.
The extra_items keyword argument to class-based TypedDicts is inferred as an annotation expression.
Type qualifiers are validated in functional TypedDict fields and in the extra_items keyword to functional TypedDicts.
Loop header assignments are marked as used, avoiding false positives in unused-variable diagnostics.
Fixes a debug-build panic when requesting autocomplete suggestions for list[int].
Propagates type context through await expressions.
Improves support for Callable type context.
Synthesized constructor methods now name their first argument _cls.
Fixes nested global and nonlocal lookups through forwarding scopes.
Fixes instance-attribute lookup in methods of protocol classes.
Fixes a panic when checking list[Annotated[()]].
Methods accessed off an instance are no longer incorrectly inferred as singleton types.
Fixes semantic token classification for properties accessed on instances.
Adds bidirectional type context for TypedDict get() defaults.
Adds bidirectional type context for TypedDict pop() defaults.
Fixes a stack overflow when checking a recursive type alias involving TypeIs and Callable.
Resolves union-likes when emitting union attribute errors.
Respects dataclass_transform parameters that are not explicitly defined.
Improves call inference for keyword-only dict().
Respects terminal-function-call narrowing in global scope.
Prevents these panics in more situations.
Fixes false positives and false negatives when unpacking a union of tuples into a function call.
Preserves blank lines between comments and imports when applying the add-import action.
Prevents tainted loop bindings during cycle normalization.
Fixes folding ranges for comments separated by statements.
Reduces the diagnostic range for invalid-metaclass.
Improves reachability analysis for isinstance().
Improves keyword argument narrowing for nested dictionaries.
Fixes reachability cycles in loop headers during conditional unpacking.
Unions and intersections of gradual types are now assignable to Never.
Fixes subtyping for intersections containing NewTypes of unions versus unions.
Simplifies an intersection of N & ~T to Never when the corresponding concrete-base intersection B & ~T simplifies to Never.
Fixes panic propagation in Salsa.
Fixes untracked reads that could lead to backdating panics.
Bounded typevars expand to their upper bounds when evaluating truthiness comparisons between intersections and literal types.
Avoids eager TypedDict diagnostics for TypedDict | dict unions.
Fixes variance of frozen dataclass-transform models.
Avoids inferring intersection types for call arguments as a result of bidirectional inference, improving performance and correctness.
Subscripts for unknown TypedDict keys now return Unknown.
Fixes overflow with recursive TypeIs.
Fixes inference of conditionally defined properties.
Respects
kw_onlyoverwrites in dataclasses when interpretingdataclass_transform.Prevents too-many-cycle panics when inferring loop variables with
Literaltypes.Fixes false-positive diagnostics for PEP-604 union annotations on attribute targets in Python 3.9 when future annotations are enabled.
A constrained TypeVar with str as a constraint narrows to T & str rather than str.
Ensures T & ~S is inferred as a subtype of U when T is understood as a subtype of U.
Duplicate-looking overloaded callables are disambiguated in union display.
Fixes a stack overflow that could occur with certain recursive protocols.
A subdirectory's tool.ty.overrides can override error = "all" from a root pyproject.toml.
Variables assigned using tuple unpacking in loops are no longer inferred as Divergent.
Unsound upcasting to constructor Callable types is limited to assignability checks, not redundancy or subtyping checks.
Fixes precedence of the
allselector in TOML configurations.Preserves
Anyattributes asAnyafterisinstancenarrowing instead of replacing them withobject.Allows unions of different-length iterables to unpack into optional positional parameters.
Excludes decorators from class and def code-folding regions in the LSP server.
Avoids inferring generics with negative intersections.
Fixes a panic when handling incomplete except handlers.
Better preserves user-provided union order in inferred specializations.
Fixes LSP server handling of non-Python text documents.
Validates bare
ParamSpecusage in annotations and supports stringifiedParamSpecvalues as the first argument toCallable.Avoids stack overflow when processing recursive type variables.
Adds more validation for type-variable defaults.
Applies narrowing to walrus values.
Corrects subtype checking for variadic positional parameters against positional-or-keyword parameters, and fixes overloaded callable assignability for unary Callable targets.
Treats dataclasses created through dataclass_transform as neither frozen nor non-frozen.
Detects inconsistent generic base class specializations appearing in the same MRO.
Negative narrowing is disallowed for checks involving type[] types, and special-cased argument validation now recurses into tuples and nested tuples.
Fixes binary operations between an instance of a NewType of float and an instance of Any or Unknown.
Adds more ParamSpec validation for P.args and P.kwargs.
The command now works when ty is installed into an ephemeral virtual environment.
Limits recursion depth when displaying self-referential function types.
Fixes inference of t.__mro__ when t is an instance of type[Any].
Fixes a panic when rendering a code frame that points to leading whitespace.
Fixes a panic when narrowing the type of a dictionary key assigned through a multi-target assignment.
Fixes inlay hints for starred unpacking targets in the LSP server.
Prevents overloads in another file from being incorrectly associated with a function in the checked file, avoiding panics and incorrect inference.
Fixes equality and
__contains__narrowing involving PEP-695 type aliases.Reimplements equivalence as mutual subtyping of top and bottom materializations, fixing incorrect overload evaluation and false-positive
assert_typeandredundant-castdiagnostics.Improves diagnostics when attempting to specialize non-generic types.
Fixes an infinite hang on mutually recursive type alias definitions.
Recognizes that control flow terminates after awaiting a function returning
typing.Awaitable[typing.Never]or a similar type.Fixes assignability, subtyping, and equivalence checks involving
typing.Generatorbefore Python 3.13.Diagnostics for abstract @final classes are improved.
Override detection now considers synthesized methods and ClassVar-qualified declarations.
Fixes the inferred return type of assert_never.
Fixes assert_type diagnostic messages.
TypeVars in parameter types are now resolved.
Callable types are parenthesized when used in the return annotation of other callable types.
Fixes diagnostics disappearing after an external file is opened.
Removes spurious destinations for variables defined in a loop.
When baking an inlay hint into source, ty uses the fully qualified name if the scope already contains a variable matching the unqualified name.
Fixes incorrect inferred types when unpacking mixed tuples.
Self is now allowed in ClassVar type annotations.
Fixes server panics that could occur while computing semantic tokens for the current file.
Classes dynamically created with type(...) and cyclic bases are now supported.
Prevents stack overflow for self-referential TypeOf in annotations.
Fixes type checking of bound method access on None.
Detects when subclasses override Final class variables.
Uses a smaller diagnostic range for inconsistent-mro diagnostics.
Avoids promoting constrained TypeVars with Literal bounds to Literal types.
Fixes type checking of method calls on subclasses of Any.
Improves how ParamSpecs are displayed in some situations.
Improves reference spans for submodules imported in an __init__.py file.
Supports type narrowing in situations where code calls NoReturn functions.
Fixes false positives in checks for shadowed TypeVars.
Autocomplete omits the class being defined when suggesting names as the user types its bases.
Completion suggestions for class bases exclude classes already included.
Diagnostic mode is now consistent across projects inside the LSP server.
Cross-file find-references now works for keyword arguments.
Goto-definition for class constructors now always navigates to the class definition.
Fixes incorrect inlay hints for overloaded function arguments.
The checker now respects
@no_type_checkwhen it is combined with other decorators.Fixes combinatorial explosion caused by fixed-length tuple expansion during overload matching.
Stringified arguments in PEP-613 aliases to Optional are now allowed.
Corrects the diagnostic location for an incorrect sub-call to a specialized ParamSpec.
TypedDict constructor calls are validated for generic aliases and
type[...]targets.Fixes false-positive diagnostics when
total=is provided to TypedDict classes with PEP-695 type parameters.Fixes a fuzzer panic triggered by a slice expression in an unclosed comprehension.
Detects generic Callables in function signature return types.
Lookup of
__contains__now respects descriptors.Field specifiers are visible when transformed models are nested inside methods.
Tracks dictionary literal keys as individual places to reduce false positives involving heterogeneous dictionaries.
Import resolution now supports packages installed in Debian/Ubuntu dist-packages directories.
Hover hints now show type qualifiers such as
Final; bareFinalinstance attributes no longer show asUnknown.Fixes edge cases when narrowing tagged unions in
matchstatements.Attribute lookup on class objects falls back to metaclass
__getattr__or__getattribute__.Fixes bugs affecting nested
NewTypes based onfloat.Improves detection of invalid NewTypes with generic bases.
Fixes narrowing of
nonlocalvariables with conditional assignments.Avoids false-positive diagnostics for certain intersection types when iterating.
Bidirectional inference and type narrowing involving PEP 695 aliases are improved.
Supports legacy namespace packages declared using
pkg_resources.declare_namespace.Subclass overrides may omit a superclass positional-only parameter when the subclass parameter has a default value; incorrect legacy positional-only conventions are diagnosed.
Diagnoses invalid
issubclass()calls against Protocol classes with non-method members, and invalid simultaneous subclassing ofProtocol[]andGeneric[].Fixes
Selfresolution for classes nested within methods.Support for stringized annotations in very large files is fixed, and LSP navigation and highlighting support is improved.
Fixes construction of a TypedDict from existing TypedDict values.
Fixes unary and comparison operator handling for TypeVars with union bounds.
Uses type context from augmented assignment dunder calls.
Avoids emitting duplicate syntax errors for await expressions outside functions.
Fixes false positives for binary and unary operators on constrained TypeVars.
Fixes assignment in a decorated method causing an Unknown fallback.
Fixes rendering of literal blocks that follow doctests.
Fixes a panic when a final method is overridden using an assignment.
Supports recursive and stringified annotations in functional typing.NamedTuple definitions.
Fixes handling of generic functions decorated with a generic ParamSpec decorator.
Fixes the output format for empty diagnostics.
Go to Definition now looks up attributes on metaclasses.
When reporting invalid @final decorators, diagnostics point to the overload with the invalid decorator.
Improves support for kwarg splats in dictionary literals.
Fixes a false negative when a non-runtime-checkable protocol is used in a match class pattern.
Fixes assertion panics involving memo.changed_at.
Failed namedtuple() and NamedTuple calls now use a more lenient fallback type.
Supports solving generics involving PEP 695 type aliases.
Improves completion rankings in raise-from and except contexts.
Checks that starred arguments in function calls are iterable.
Diagnostics now disambiguate different type aliases that share the same name.
Fixes a false positive for the unsupported-operator diagnostic on symmetric TypeVars.
Keyword arguments are now considered when unpacking a variadic argument.
Validates constructor arguments when a class is used as a decorator.
Improves completion suggestions inside class definitions.
Removes suggestions for redundant re-exports that share the same top-most module.
Avoids overload errors when detecting dataclass-on-tuple.
Uses
stras the type of__file__when applicable on imported modules.Fixes excluding entire directories with --force-exclude.
Adds a diagnostic for overridden
__setattr__and__delattr__methods.Fixes the inferred MRO of functional namedtuple classes.
Fixes the return type for synthesized
NamedTuple.__new__methods.Makes ModuleType and object attributes available on namespace packages.
Infers the implicit type of
clsin__new__methods.Fixes unary operators on NewTypes of
floatorcomplex.Avoids reporting overload errors for successful union variants.
Adds simple syntactic validation for the right-hand side of PEP-613 type aliases.
Fixes type aliases not expanding during overload resolution.
Does not add a subdiagnostic pointing to the TypeVar definition when the TypeVar is
Self.Recognizes string-literal types as subtypes of
Sequence[Literal[chars]].Fixes missing syntax highlighting for aliased import names.
Highlights interpolated parts in t-strings.
Applies special-case subscript inference when a union of tuples or an alias to a tuple type is subscripted.
Validates field names for
typing.NamedTuple(...).Casting an object to a TypedDict or union of TypedDicts no longer risks a panic.
Fixes the interaction between
classmethod,contextmanager, andSelf.Supports
dataclass_transformwhen used as a function call.Narrows the right-hand side of
==,!=,is, andis notconditions when the left-hand side is not narrowable.LSP completions show
strinstead ofstr | Nonewhen the inferred type isstr.Generated method signatures now reflect the signature of the user-provided method.
Avoids reporting grandparent-class Liskov violations when fixing them would introduce violations against a parent class.
Fixes a false positive for bounded type parameters used with
NewType.Fixes stack overflow for recursive type aliases containing tuple types.
Improves rendering of ReST directives in docstrings in the LSP server.
Improves type context support for __setitem__ dunder calls.
Checks contravariant type variable bounds contravariantly during specialization inference.
Fixes the
@Todotype for starred expressions.Detects invalid
@total_orderingapplications in non-decorator contexts.Improves disambiguation of types in diagnostics.
Narrowing uses the top materialization of classes; for example,
type(x) is tupleintersectsxwithtuple[object, ...]rather thantuple[Unknown, ...].Fixes incorrect type narrowing for
if type(x) == y.Calls to
type()infertype[Unknown]when overload evaluation is ambiguous.Applies type narrowing to walrus targets.
The LSP server no longer shows diagnostics for excluded files.
Fixes goto definition for relative imports in third-party files.
Declares support for Python 3.14.
Fixes handling of super with TypeVar-annotated self and cls parameters.
Only fully static pivots are considered when deriving transitive constraints.
Fixes handling of subclasses in Callables.
Improves simplification of intersections of tuples.
Improves type narrowing in calls to len().
Fixes comparisons and arithmetic involving NewTypes of float.
Fixes handling of ParamSpec in overloaded functions.
Fixes stale semantic tokens when the same document is opened with new content.
Fixes a stack overflow caused by a stack size that was too small.
Fixes several issues involving unannotated function return types.
Emit a diagnostic when a class decorator is not callable with a type.
Fix exhaustiveness inference for unions that include enums.
Avoid displaying a misleading inlay hint for unpacked tuple arguments.
Stop including property in subclasses properties.
Completions are fixed for decorators with missing declarations.
The invalid assignment diagnostic message is preserved when a definition is implicitly shadowed.
The wording of the unsupported-base sub-diagnostic is improved.
Improves the diagnostic for using callable in a type expression instead of collections.abc.Callable or typing.Callable.
Improves the diagnostic when accessing a function attribute on a Callable type.
Checks __delitem__ instead of __getitem__ when analyzing del x[k].
Synthesizes __delitem__ for TypedDict, allowing deletion of non-required keys.
Renders the entire diagnostic message in all output formats.
Fixes module resolution on network drives.
Fixes classification of modules in import aliases for semantic syntax highlighting.
Fixes incorrect self binding when @staticmethod is combined with other decorators.
Fixes the implementation of Top[Callable[..., object]].
Aborts printing diagnostics when Ctrl+C is pressed.
Respects debug text interpolation in f-strings.
Synthesizes a precise _fields attribute for NamedTuples.
Binds self with the instance in __get__.
Fixes a panic caused by unexpanded type aliases in implicit tuple aliases.
Avoids inserting type[T@f] when double-clicking on the inlay.
Synthesizes a precise _replace method for NamedTuples.
Supports == narrowing for tuples in unions with disjoint types.
Supports type[T] when T is a type alias to a union of types.
Fixes a panic from unstable union-type ordering in fixed-point iteration.
Fixes a debug-mode server panic when a user types a class definition by visiting class arguments in source order for semantic tokens.
Supports dict(...) calls in TypedDict contexts.
Understands that an enum class attribute defined using enum.nonmember has type int.
Respects intersections in iterations.
CLI output is cleared only between two successful checks.
The LSP server now gracefully handles client requests that cannot be deserialized.
Goto-declaration now works on the right-hand side of from-import statements that import a submodule.
Autocompletions no longer suggest keyword statements where only expressions are valid.
Some configuration panics in the LSP are fixed.
Multiline tokens are correctly encoded for clients that do not support them.
Metaclass-based transformers are recognized as instances of DataclassInstance.
Deferred values in keyword arguments and other contexts are respected in .pyi files.
Field specifier functions that accept **kwargs are handled.
Identical lower and upper bounds are no longer added multiple times when inferring specializations.
Type disambiguation is improved in many cases.
Diagnostics avoid extremely long lines when they encounter verbose types.
Converting a class constructor into a Callable no longer uses an implicit superclass annotation.
classmethod-ness is propagated through decorators that return Callable values.
The LSP server displays completions using their actual insertion text.
Rendering of default values for function arguments is improved.