npm pyright 1.1.307
Published 1.1.307

latest releases: 1.1.388, 1.1.387, 1.1.386...
18 months ago

Enhancement: Added support for type narrowing of TypedDicts with NotRequired entries with map patterns that use a literal str key pattern.

Behavior Change: Adjusted heuristic for dealing with ambiguous overloads due to unknown argument types. If one or both overloads include an Any in its return type, it now produces an Unknown result.

Bug Fix: Added support for constructors to PEP 712 mechanism.

Enhancement: Expanded special-case handling of .value and .name properties of Enum instance. It now handles non-literal cases by evaluating a union of all possible names or values defined in the enum.

Behavior Change: Changed behavior of logic that infers the type of the value and _value_ members of an enum instance. If the Enum class defines a __new__ method, these are evaluated as Any rather than a type based on their assigned value because the __new__ method can transform the value in ways that cannot be determined statically.

Behavior Change: Modified the logic (and associated behavior) for constructor validation in cases where a metaclass has a custom __call__ method. This is part of a larger effort to clean up constructor validation and make it more consistent with runtime behaviors.

Enhancement: Updated typeshed stubs to the latest version.

Bug Fix: Fixed a bug that resulted in a false positive error when binding a classmethod within a metaclass (i.e. a subclass of type).

Bug Fix: Fixed bug that caused any function or method named deprecated to be treated as though it behaved like typing.deprecated (introduced in PEP 702).

Behavior Change: Improved handling of NewType when Any is passed as a second argument.

Behavior Change: Made "Pyproject file has no pyright section" log message an "Info" message rather than an error to reduce noise.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.