GitHub
05/08/2026, 8:57 PMty from 0.0.32 to 0.0.33
Release notes
Sourced from ty's releases.
0.0.33
Release Notes
Released on 2026-04-28.
Notable changes
• ty now prefers the declared type of an annotated assignment in more situations (#24802). Consider this example:
from some_library import untyped_function
threshold: int | None = 0
result: str = untyped_function()
ty previously favored the inferred type of the right hand side expression whenandthresholdwere used. This is useful forresult, as it allows something likethresholdto work without an error: we know thatthreshold += 1could later becomethreshold, but right now, we see that it is anNone. However, forint, the inferred type isresult. This is not a useful type and it can lead to false negatives. Starting with this release, ty will therefore prefer the declared type if the inferred and declared types are mutually assignable. In the above example,Unknownwill still be inferred asthreshold(or ratherint), butLiteral[1]will now be inferred asresult. If you previously added `cast`s to work around this behavior, you should be able to remove them after upgrading.str
Bug fixes
• Fix reporting of annotation-only locals as unused (#24811)
• Fix project and workspace selection (#24824)
• Fix go-to definition for generic classes (#24714)
• Fix receiver coloring for aliased decorators (#24884)
LSP server
• Add support for go-to definition in literal enum member inlay hints (#24792)
• Add support for "baking" keyword argument inlay hints into the source code (#24667)
• Don't allow inlay hint edits when introducing a non global scope symbol (#24797)
• Omit semantic highlighting for unresolved symbols (#24718)
Core type checking
• Support narrowing with aliased conditional expressions (#24302)
• Model short-circuiting control flow in Boolean expressions (#24458)
• Handleblocks where all `try`/`except` blocks are terminal (#24882)finally
• Detect invalidvs instance-attribute overrides (#24767)ClassVar
• Emit diagnostic for invalid uses of(#24868)Unpack[...]
• Infer lambda parameter types withtype context (#24317)Callable
• Supportunpacking of**in dict-literal assignments (#24703)TypedDict
• SupportinUnpack[TypedDict]signatures (#24653)**kwargs
• Treatas an irrefutable pattern when matching on[*xs](#24787)Sequence
• Improve generics solving for unions in invariant positions (#24698)
• Improve generics solving for unions when matching against protocols (#24837)
Diagnostics... (truncated) Changelog Sourced from ty's changelog.
0.0.33
Released on 2026-04-28.
Notable changes
• ty now prefers the declared type of an annotated assignment in more situations (#24802). Consider this example:
from some_library import untyped_function
threshold: int | None = 0
result: str = untyped_function()
ty previously favored the inferred type of the right hand side expression whenandthresholdwere used. This is useful forresult, as it allows something likethresholdto work without an error: we know thatthreshold += 1could later becomethreshold, but right now, we see that it is anNone. However, forint, the inferred type isresult. This is not a useful type and it can lead to false negatives. Starting with this release, ty will therefore prefer the declared type if the inferred and declared types are mutually assignable. In the above example,Unknownwill still be inferred asthreshold(or ratherint), butLiteral[1]will now be inferred asresult. If you previously added `cast`s to work around this behavior, you should be able to remove them after upgrading.str
Bug fixes
• Fix reporting of annotation-only locals as unused (#24811)
• Fix project and workspace selection (#24824)
• Fix go-to definition for generic classes (#24714)
• Fix receiver coloring for aliased decorators (#24884)
LSP server
• Add support for go-to definition in literal enum member inlay hints (#24792)
• Add support for "baking" keyword argument inlay hints into the source code (#24667)
• Don't allow inlay hint edits when introducing a non global scope symbol (#24797)
• Omit semantic highlighting for unresolved symbols (#24718)
Core type checking
• Support narrowing with aliased conditional expressions (#24302)
• Model short-circuiting control flow in Boolean expressions (#24458)
• Handleblocks where all `try`/`except` blocks are terminal (#24882)finally
• Detect invalidvs instance-attribute overrides (#24767)ClassVar
• Emit diagnostic for invalid uses of(#24868)Unpack[...]
• Infer lambda parameter types withtype context (#24317)Callable
• Supportunpacking of**in dict-literal assignments (#24703)TypedDict
• SupportinUnpack[TypedDict]signatures (#24653)**kwargs
• Treatas an irrefutable pattern when matching on[*xs](#24787)Sequence
• Improve generics solving for unions in invariant positions (#24698)
• Improve generics solving for unions when matching against protocols (#24837)
Diagnostics
• Add error context to `invalid-ret…meltano/meltano
GitHub
05/11/2026, 2:48 AM