Release 0.0.1-alpha.6 · astral-sh/ty (original) (raw)
Release Notes
Server
- Add rule link to server diagnostics (#18128)
- Avoid panicking when there are multiple workspaces (#18151)
- Show related information in diagnostic (#17359)
Configuration
- Default
src.rootsetting to['.', '<project_name>']if ansrc/directory does not exist but a<project-name>/<project-name>directory does exist (#18141)
Typing semantics and features
- Consider a class with a dynamic element in its MRO assignable to any subtype of
type(#18205) - Ensure that a function-literal type is always considered equivalent to itself (#18227)
- Promote literals when inferring class specializations from constructors (#18102)
- Support
typing.TypeAliasType(#18156) - Infer function-call type variables in both directions (#18155)
Improvements to modeling of runtime semantics
- Integer indexing into
bytesreturnsint(#18218) - Emit
invalid-exception-caughtdiagnostics even when the caught exception is not bound to a variable (#18202)
Usability improvements
- Add hint to some diagnostics that PEP 604 union syntax is only available on Python 3.10+ (#18192)
- Add note to
unresolved-importdiagnostic hinting to users to configure their Python environment (#18207) - Make
division-by-zeroan opt-in diagnostic rather than opt-out (#18220)
Import resolution improvements
- Add support for PyPy virtual environments (#18203)
Contributors
- @dhruvmanila
- @InSyncWithFoo
- @AlexWaygood
- @MichaReiser
- @BradonZhang
- @dcreager
- @danielhollas
- @esadek
- @kiran-4444
- @Mathemmagician
- @sharkdp
- @felixscherz
- @adamaaronson
- @carljm
Install ty 0.0.1-alpha.6
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.6/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.6/ty-installer.ps1 | iex"