Release Notes
Bug fixes
- Implement Python's floor-division semantics for
Literal
int
s (#18249) - Don't warn about a
yield
expression not being in a function if theyield
expression 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
ClassVar
declarations 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_FALLBACK
policy when looking up symbols ontype
instances (#18312) get_protocol_members
returns 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-type
is emitted on a method with an empty body on a non-protocol subclass of a protocol class (#18243) - Improve
invalid-type-form
diagnostic 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-base
error code into two error codes (#18245) - Rename
call-possibly-unbound-method
topossibly-unbound-implicit-call
(#18017)
Configuration
- Add
tests
tosrc.root
by 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-files
configuration setting undersrc
section (#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"