Release Notes
Bug fixes
- Fix stack overflows related to mutually recursive protocols (#19003)
- Don't add incorrect subdiagnostic for
unresolved-reference
instaticmethod
s andclassmethod
s (#18487) - Fix rendering of long lines in diagnostic messages that are indented with tabs (#18962)
- Fix reachability of star import definitions for nonlocal lookups (#19066)
Typing semantics and features
- Support variable-length tuples in unpacking assignments (#18948)
- Allow declared-only class-level attributes to be accessed on the class (#19071)
- Infer nonlocal types as unions of all reachable bindings (#18750)
- Use all reachable bindings for instance attributes and deferred lookups (#18955)
- Improve protocol member type checking and relation handling (#18847)
- Rework disjointness of protocol instances vs types with possibly unbound attributes, preventing some false instances of
Never
inhasattr
narrowing (#19043) - Make tuple instantiations sound (#18987)
- Add subdiagnostic about empty bodies in more cases (#18942)
- Improve type-inference for
__import__(name)
andimportlib.import_module(name)
(#19008) - Eagerly evaluate certain constraints when analyzing control flow (#18998, #19044, #19068)
- Update typeshed stubs (#19060): typeshed diff
Server
Documentation
- The ty documentation is now available at docs.astral.sh/ty (#744)
Performance
- Remove
ScopedExpressionId
(#19019)
Contributors
- @InSyncWithFoo
- @MatthewMckee4
- @dcreager
- @mtshiba
- @BurntSushi
- @sharkdp
- @ibraheemdev
- @github-actions
- @carljm
- @AlexWaygood
- @MichaReiser
- @zanieb
Install ty 0.0.1-alpha.13
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.13/ty-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.13/ty-installer.ps1 | iex"