Releases: astral-sh/ty
Releases · astral-sh/ty
0.0.1-alpha.8
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
Callabletypes should have allFunctionTypeattributes available (#18242)
Diagnostics
- Add diagnostic hints for a function that has a non-
Nonereturn-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
Literaltypes are considered assignable to anything theirInstancesupertypes are assignable to (#18351) - Callable types are disjoint from non-callable
@finalnominal 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-fileCLI 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 | shInstall 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"Download ty 0.0.1-alpha.8
0.0.1-alpha.7
Release Notes
Bug fixes
- Implement Python's floor-division semantics for
Literalints (#18249) - Don't warn about a
yieldexpression not being in a function if theyieldexpression is in a function (#18008) - Fix inference of attribute writes to unions/intersections that including module-literal types (#18313)
- Fix false-positive diagnostics in binary comparison inference logic for intersection types (#18266)
- Fix instance vs callable subtyping/assignability (#18260)
- Ignore
ClassVardeclarations when resolving instance members (#18241) - Fix crash when hovering over a
ty_extensions.Intersection[A, B]expression in an IDE context (#18321) - Respect
MRO_NO_OBJECT_FALLBACKpolicy when looking up symbols ontypeinstances (#18312) get_protocol_membersreturns a frozenset, not a tuple (#18284)
Typing semantics and features
- Support
import <namespace>andfrom <namespace> import module(#18137) - Support frozen dataclasses (#17974)
- Understand that the presence of a
__getattribute__method indicates arbitrary members can exist on a type (#18280) - Add a subdiagnostic if
invalid-return-typeis emitted on a method with an empty body on a non-protocol subclass of a protocol class (#18243) - Improve
invalid-type-formdiagnostic where a module-literal type is used in a type expression and the module has a member which would be valid in a type expression (#18244) - Split
invalid-baseerror code into two error codes (#18245) - Rename
call-possibly-unbound-methodtopossibly-unbound-implicit-call(#18017)
Configuration
- Add
teststosrc.rootby default if atests/directory exists and is not a package (#18286) - Tell the user why we inferred the Python version we inferred (#18082)
- Add support for detecting activated Conda and Pixi environments (#18267)
- Move
respect-ignore-filesconfiguration setting undersrcsection (#18322)
Server
- Fix server panic when calling
system_mut(#18252) - Abort process if worker thread panics (#18211)
- Gracefully handle salsa cancellations and panics in background request handlers (#18254)
Contributors
- @felixscherz
- @carljm
- @j178
- @thejchap
- @brainwane
- @AlexWaygood
- @lipefree
- @InSyncWithFoo
- @brandtbucher
- @MichaReiser
- @maxmynter
- @fabridamicelli
- @sharkdp
Install ty 0.0.1-alpha.7
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.7/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.7/ty-installer.ps1 | iex"Download ty 0.0.1-alpha.7
0.0.1-alpha.6
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 | shInstall 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"Download ty 0.0.1-alpha.6
0.0.1-alpha.5
Release Notes
Bug fixes
- Fix assignability checks for invariant generics parameterized by gradual types (#18138)
- Revert boolean expression control flow change which caused a performance regression (#18150)
- Remove pyvenv.cfg validation check for lines with multiple
=(#18144)
Contributors
Install ty 0.0.1-alpha.5
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.5/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.5/ty-installer.ps1 | iex"Download ty 0.0.1-alpha.5
0.0.1-alpha.4
Release Notes
Enhancements
- Allow unions including
Any/Unknownas bases (#18094) - Better control flow for boolean expressions that are inside if (#18010)
- Improve invalid method calls for unmatched overloads (#18122)
- Add support for
NamedTuple'fallback' attributes (#18127) type[…]is always assignable totype(#18121)- Support accessing
__builtins__global (#18118)
Bug fixes
- Fix relative imports in stub packages (#18132)
Contributors
Install ty 0.0.1-alpha.4
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.4/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.4/ty-installer.ps1 | iex"Download ty 0.0.1-alpha.4
0.0.1-alpha.3
Release Notes
Enhancements
- Include synthesized arguments in displayed counts for
too-many-positional-arguments(#18098)
Bug fixes
- Fix
redundant-castfalse positives when casting toUnknown(#18111) - Fix normalization of unions containing instances parameterized with unions (#18112)
- Make dataclass instances adhere to DataclassInstance (#18115)
CLI
- Change layout of extra verbose output and respect
--colorfor verbose output (#18089)
Documentation
- Use Cargo-style versions in the changelog (#397)
Contributors
Install ty 0.0.1-alpha.3
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.3/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.3/ty-installer.ps1 | iex"Download ty 0.0.1-alpha.3
0.0.1-alpha.2
Release notes
Enhancements
- Improve diagnostics for failure to call overloaded function (#18073)
- Fix inconsistent casing in
invalid-return-typediagnostic (#18084) - Add type-expression syntax link to
invalid-type-expressiondiagnostics (#18104)
Bug fixes
Typing
- Infer parameter specializations of explicitly implemented generic protocols (#18054)
- Check assignments to implicit global symbols are assignable to the types declared on
types.ModuleType(#18077) - Fix various generics-related TODOs (#18062)
Documentation
- Fix rule link in the configuration description (#381)
- Use
https://ty.dev/ruleswhen linking to the rules table (#18072) - Use
ty serverinstead ofty lsp(#360) - Fix missing
>in HTML anchor tags in CLI reference (#18096) - Fix link to rules docs (#378)
- Fix repository in README transform script (#361)
Contributors
- @dhruvmanila
- @Usul-Dev
- @dcreager
- @AlexWaygood
- @BurntSushi
- @MichaReiser
- @frgfm
- @kiran-4444
- @sharkdp
- @eruditmorina
Install ty 0.0.1-alpha.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.2/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.2/ty-installer.ps1 | iex"Download ty 0.0.1-alpha.2
0.0.1-alpha.1
Install ty 0.0.1-alpha.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.1/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.1/ty-installer.ps1 | iex"Download ty 0.0.1-alpha.1
0.0.0-alpha.8
Install ty 0.0.0-alpha.8
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.0-alpha.8/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.0-alpha.8/ty-installer.ps1 | iex"Download ty 0.0.0-alpha.8
0.0.0-alpha.7
Install ty 0.0.0-alpha.7
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.0-alpha.7/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.0-alpha.7/ty-installer.ps1 | iex"