Release 0.0.1-alpha.7 · astral-sh/ty (original) (raw)
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 | sh
Install 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"