github microsoft/pyright 1.1.204
Published 1.1.204

latest releases: 1.1.389, 1.1.388, 1.1.387...
2 years ago

Behavior Change: Added special-cased handling for __slots__ and __class_getitem__ in protocol matching logic.

Enhancement: Improved bidirectional type inference for lambdas with default argument values.

Enhancement: Improved heuristics for when constraint solver should prefer literals over non-literals when solving a TypeVar in the case of bidirectional inference when assigning to a callable type.

Enhancement: Added support for unpacking of tuples in type annotations (part of PEP 646).

Bug Fix: Fixed bug that resulted in false positive error when a Literal was used within a Python-2 style type annotation comment.

Enhancement: Updated typeshed stubs to the latest.

Bug Fix: Fixed bug in "x is None" type guard logic. It wasn't preserving conditional types if x was a TypeVar.

Bug Fix: Fixed bug that resulted in false positive error when a constrained TypeVar was checked against a particular constraint in an isinstance type guard.

Bug Fix: Fixed a bug in the logic for assignment-based type narrowing that resulted in the wrong narrowed type if the declared type of the destination expression contained a union and the source contained a TypeVar.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.