Release Notes
Released on 2026-02-10.
Bug fixes
- Allow stringified argument in PEP-613 alias to
Optional(#23200) - Fix fuzzer panic on slice expression in unclosed comprehension (#23146)
- Fix combinatorial explosion due to fixed-length tuple expansion in overload matching (#23190)
- Respect
@no_type_checkwhen combined with other decorators (#23177) - Fix diagnostic location for an incorrect sub-call to a specialized ParamSpec (#23036)
LSP server
- Assign lower completions ranking to deprecated functions and classes (#23089)
- Change goto-def for class constructors to always go to class definition (#23071)
- Ensure diagnostic mode is consistent across projects inside the LSP server (#23121)
- Don't include the class
Fooin autocomplete suggestions when the user is typing outFoo's bases (#23141) - Fix parameter references across files via keyword args (#23012)
- Fix wrong inlay hints for overloaded function arguments (#23179)
- Support diagnostics in newly created files inside neovim (#23095)
- Exclude already-included classes when providing completion suggestions for class bases (#23085)
CLI
- Add support for
TY_OUTPUT_FORMATenvironment variable (#23123) - Fall back to
python3found in$PATHif no environment is found (#22843)
Type checking
- Add
inconsistent-mroautofix to moveGeneric[]to the end of the bases list (#22998) - Add precise return-type inference for
struct.unpack(#22562, #23130) - Disallow TypeVars within ClassVars (#23184)
- Emit diagnostic on unbound call to abstract
@classmethodor@staticmethod(#23182) - Fix false-positive diagnostics when providing the
total=keyword toTypedDictclasses that had PEP-695 type parameters (#23114) - Narrow both left- and right-hand operands where possible (#23084)
- Narrow chained operators (#23093)
- Narrow equality subscripts on either operand (#23104)
- Recognize
__dataclass_transform__to support SQLModel (#23070) - Relax the attribute narrowing condition to support deeper-nested attribute type narrowing (#22440)
- Support constrained TypeVar compatibility across function boundaries (#23103)
- Support comparison methods (
__gt__, etc.) where a parameter is annotated with aLiteraltype (#23100) - Support partially specialized type context (#22748)
- Use type context when inferring constructor argument types (#23139)
- Validate
TypedDictconstructor calls for generic aliases andtype[...]targets (#23113)
Performance
- Conservative narrowing places optimization (#22734)
Contributors
- @rbange
- @rayzeller
- @charliermarsh
- @11happy
- @figsoda
- @mtshiba
- @ibraheemdev
- @ngnpope
- @sakgoyal
- @oconnor663
- @ericmarkmartin
- @Hugo-Polloli
- @Glyphack
- @sharkdp
- @carljm
- @BurntSushi
Install ty 0.0.16
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.16/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.16/ty-installer.ps1 | iex"