Release Notes
Released on 2025-11-25.
Bug fixes
- Fix panic for unclosed string literal in type annotation position (#21592)
LSP server
- Improve go-to-definition and add go-to-definition for inlay hints
(#21545,
#21546,
#21544,
#21616,
#21548) - Implement go-to-type for inlay type hints (#21533)
- Add "remove unused ignore comment" code action (#21582)
- Don't suggest completions that aren't subclasses of
BaseExceptionafterraise(#21571) - Implement double click to insert inlay hint (#21600)
- Fix edge cases for autocomplete suppressions in variable bindings (#21576)
- Implement docstring rendering to markdown (#21550)
- Support string annotations (#21577)
- Improve import detection for completions and support
from ...<CURSOR>completions (#21547) - Improve handling of hover/goto on imports (#21572)
- Don't allow edits of some more invalid syntax types in inlay hints (#21621)
- Resolve applicable overloads for hover on an overloaded function call (#21417)
- Consistently add the
DEFINITIONmodifier when computing semantic tokens (#21521) - Suppress autocomplete suggestions during variable binding (#21549)
CLI
- Exit with code
2if there's any IO error (#21508)
Other changes
- Add hint about resolved Python version when a user attempts to import a member added on a newer version (#21615)
- Attach subdiagnostics to
unresolved-importerrors for relative imports as well as absolute imports (#21554) - Avoid expression re-inference for diagnostics (#21267)
- Check method definitions on subclasses for Liskov violations (#21436)
- Eagerly evaluate
types.UnionTypeelements as type expressions (#21531) - Extend Liskov checks to also cover classmethods and staticmethods (#21598)
- Fix rendering of unused suppression diagnostic (#21580)
- Implement
typing.override(#21627) - Improve concise diagnostics for invalid exceptions when a user catches a tuple of objects (#21578)
- Improve debug messages when imports fail (#21555)
- Improve diagnostics when
NotImplementedis called (#21523) - Improve diagnostics when a submodule is not available as an attribute on a module-literal type (#21561)
- Improve several "Did you mean?" suggestions (#21597)
- Narrow type context during literal promotion in generic class constructors (#21574)
- Retain the function-like-ness of
Callabletypes when bindingself(#21614) - Substitute for
typing.Selfwhen checking protocol members (#21569) - Switch the error code from
unresolved-attributetopossibly-missing-attributefor submodules that may not be available (#21618) - Implement
TypedDictstructural assignment (#21467) - Make implicit submodule imports re-exported (#21573)
- Support PEP 613
typing.TypeAliastype aliases (#21394) - Support generic aliases in
type[...], liketype[C[int]](#21552) - Tighten up handling of subscripts in type expressions (#21503)
Contributors
- @Gankra
- @MatthewMckee4
- @AlexWaygood
- @RasmusNygren
- @dcreager
- @BurntSushi
- @carljm
- @MichaReiser
- @sharkdp
- @oconnor663
- @lucach
- @ibraheemdev
Install ty 0.0.1-alpha.28
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.28/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.28/ty-installer.ps1 | iex"