Release Notes
Typing semantics and features
- Add generic inference for dataclasses (#18443)
- Add support for global
__debug__
constant (#18540) - Argument type expansion for overload call evaluation (#18382)
- Exclude members starting with
_abc_
from a protocol interface (#18467) - Infer
list[T]
for starred target in unpacking (#18401) - Infer
list[T]
when unpacking non-tuple type (#18438) - Support type annotation for legacy typing aliases for generic classes (#18404)
- Allow using
dataclasses.dataclass
as a function (#18440) - Type narrowing for attribute/subscript assignments (#18041)
Diagnostics
- Add hints to
invalid-type-form
for common mistakes (#18543) - Add subdiagnostic suggestion to
unresolved-reference
diagnostic when variable exists onself
(#18444) - Track the origin of the
environment.python
setting for better error messages (#18483)
CLI
- Fix
--python
argument for Windows, and improve error messages for bad--python
arguments (#18457)
Bug fixes
- Meta-type of type variables should be
type[..]
(#18439) - Only consider a type
T
a subtype of a protocolP
if all ofP
's members are fully bound onT
(#18466) - Fix false positives for legacy
ParamSpec
s insideCallable
type expressions (#18426) - Fix panic when pulling types for
UnaryOp
expressions insideLiteral
slices (#18536) - Fix panic when trying to pull types for attribute expressions inside
Literal
type expressions (#18535) - Fix panic when trying to pull types for subscript expressions inside
Callable
type expressions (#18534) - Treat lambda functions as instances of
types.FunctionType
(#18431) - Implement disjointness between
Callable
andSpecialForm
(#18503)
Server
- Fix stale diagnostics in documents on Windows (#18544)
- Add support for
object.<CURSOR>
completions (#18468) - Only provide declarations and bindings as completions (#18456)
Documentation
- Add
CONDA_PREFIX
to--python
documentation (#18574) - Update list of referenced environment variables (#612)
- Document how the default value for
python-version
is determined (#18549) - Document the
"all"
option forpython-platform
(#18548)
Contributors
- @AlexWaygood
- @charliermarsh
- @mtshiba
- @benbaror
- @sharkdp
- @carljm
- @MichaReiser
- @lipefree
- @BurntSushi
- @DetachHead
- @MatthewMckee4
- @suneettipirneni
- @abhijeetbodas2001
- @ibraheemdev
- @dhruvmanila
Install ty 0.0.1-alpha.9
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.9/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.9/ty-installer.ps1 | iex"