0.0.9
Release Notes
Released on 2026-01-05.
Bug fixes
- Emit a diagnostic if a class decorator is not a callable accepting a type (#22375)
- Fix exhaustiveness inference for unions that include enums (#22290)
Core type checking
- Support
typing.TypeGuard(#20974) - Treat
__setattr__as fallback-only (#22014) - Don't expand type aliases via type mappings unless necessary. This means that the displayed signature of a bound methods will no longer eagerly expand type aliases into their aliased types (#22241)
- Narrow
TypedDictunions withnot in(#22349) - Don't including
propertyin subclasses properties (#22088) - Narrow tagged unions of
TypedDicts inmatchstatements (#22299) - Teach bidirectional inference about subtyping. This allows
xto be inferred aslist[int]forx: Iterable[int] = [42](#21930) - Support narrowing for tagged unions of tuples where one element of the tuple is a
Literaltype (#22303)
LSP server
- Add autocomplete suggestions for keyword arguments in
classstatements (#22110) - Avoid showing misleading inlay hint for unpacked tuple arguments (#22286)
Other changes
- Sync vendored typeshed stubs (#22302, #22321, #22324). Typeshed diff
Contributors
- @RasmusNygren
- @ericmarkmartin
- @AlexWaygood
- @ibraheemdev
- @charliermarsh
- @felixscherz
- @MatthewMckee4
- @mtshiba
Install ty 0.0.9
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.9/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.9/ty-installer.ps1 | iex"