Release Notes
Bug fixes
- Always refresh diagnostics after a watched files change (#19697)
- Correctly instantiate generic class that inherits
__init__from generic base class (#19693) - Don't panic with argument that doesn't actually implement Iterable (#19602)
- Fix "peek definition" in playground (#19592)
- Fix empty spans following a line terminator and unprintable character spans in diagnostics (#19535)
- Fix incorrect diagnostic when calling
__setitem__(#19645) - Fix lookup order of class variables before they are defined (#19743)
- Fix more false positives related to
GenericorProtocolbeing subscripted with aParamSpecorTypeVarTuple(#19764) - Keep track of type qualifiers in stub declarations without right-hand side (#19756)
Server
- Add progress reporting to workspace diagnostics (#19616)
- Add stub mapping support to signature help (#19570)
- Added support for "document symbols" and "workspace symbols" (#19521)
- Fix server panic in workspace diagnostics request handler when typing (#19631)
- Implement caching for workspace and document diagnostics (#19605)
- Implement long-polling for workspace diagnostics (#19670)
- Implement streaming for workspace diagnostics (#19657)
- Implemented support for "selection range" language server feature (#19567)
CLI
- Add progress bar to
--watchmode (#19729) - Clear the terminal screen in
--watchmode (#19712) - Resolve file symlinks in src walk (#19674)
Typing semantics and features
- Support
async/await,async withandyield from(#19595) - Add support for
async forloops and async iterables (#19634) - Don't include already-bound legacy typevars in function generic context (#19558)
- Infer types for key-based access on
TypedDicts (#19763) - Improve
isinstance()truthiness analysis for generic types (#19668) - Infer
type[tuple[int, str]]as the meta-type oftuple[int, str](#19741) - Remove false positives when subscripting
GenericorProtocolwith aParamSpecorTypeVarTuple(#19749) - Remove special casing for string-literal-in-tuple
__contains__(#19642) - Remove special casing for tuple addition (#19636)
- Return
Option<TupleType>frominfer_tuple_type_expression(#19735) - Support
as-patterns in reachability analysis (#19728) - Support
__setitem__and improve__getitem__related diagnostics (#19578) - Synthesize precise
__getitem__overloads for tuple subclasses (#19493) - Track different uses of legacy typevars, including context when rendering typevars (#19604)
- Upcast heterogeneous and mixed tuples to homogeneous tuples where it's necessary to solve a
TypeVar(#19635) - Fix incorrect lazy scope narrowing (#19744)
- Synthesize
__replace__for dataclasses (#19545)
Diagnostics
- Add diagnostics for async context managers (#19704)
- Display generic function signature properly (#19544)
- Improve the
Displayfor generictype[]types (#19667) - Remap Jupyter notebook cell indices in
ruff_db(#19698)
Documentation
- Add the
tybadge (#897)
Contributors
- @mtshiba
- @MichaReiser
- @sharkdp
- @github-actions
- @UnboundVariable
- @jorenham
- @silamon
- @AlexWaygood
- @thejchap
- @ngroman
- @leandrobbraga
- @dcreager
- @ntbre
- @MatthewMckee4
Install ty 0.0.1-alpha.17
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.17/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.17/ty-installer.ps1 | iex"