Release Notes
Typing semantics and features
- Add subtyping between Callable types and class literals with
__init__
(#17638) - Implement implicit inheritance from
Generic[]
for PEP-695 generic classes (#18283) - Infer the Python version from the environment if feasible (#18057)
- Support ephemeral uv virtual environments (#18335)
- Model that some
Callable
types should have allFunctionType
attributes available (#18242)
Diagnostics
- Add diagnostic hints for a function that has a non-
None
return-type annotation but no return statements (#18359) - Add hint if async context manager is used in non-async with statement (#18299)
- Improve diagnostics if the user attempts to import a stdlib module that does not exist on their configured Python version (#18403)
- Tell the user why we inferred a certain Python version when reporting version-specific syntax errors (#18295)
Bug fixes
- Fix multithreading related hangs and panics (#18238)
- Ensure
Literal
types are considered assignable to anything theirInstance
supertypes are assignable to (#18351) - Callable types are disjoint from non-callable
@final
nominal instance types (#18368) - Support callability of bound/constrained typevars (#18389)
Server
- Fix server hang after shutdown request (#18414)
- Improve completions by leveraging scopes (#18281)
- Support cancellation and retry in the server (#18273)
- Support publishing diagnostics in the server (#18309)
CLI
- Add
--config-file
CLI arg (#18083)
Contributors
- @AlexWaygood
- @BurntSushi
- @lipefree
- @MatthewMckee4
- @dhruvmanila
- @zanieb
- @carljm
- @thejchap
- @sharkdp
- @InSyncWithFoo
- @MichaReiser
Install ty 0.0.1-alpha.8
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.8/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.8/ty-installer.ps1 | iex"