github microsoft/pyright 1.1.213
Published 1.1.213

latest releases: 1.1.383, 1.1.382, 1.1.381...
2 years ago

Behavior Change: For not-required TypedDict fields, added a second synthesized overload for the two-parameter form of get that specifies the type of the second parameter is the same type as the field value. The other overload allows this second parameter to be of a different type.

Bug Fix: Fixed bug that resulted in a false positive when accessing a field in a base class that provides a __getattr__ method and is use in conjunction with another base class.

Bug Fix: Fixed bug that resulted in crash due to infinite recursion.

Bug Fix: Fixed a bug in the logic that detects duplicate enum members that resulted in a false positive when an enum class has other instance variables that are not enum members.

Bug Fix: Added special-case handling for instance variables in a dataclass that are marked Final. Previously, these were flagged as an error because there was no explicit value assigned to them, but the synthesized __init__ method implicitly initializes them.

Enhancement: Added check for a class that derives from a protocol class where the protocol declares a method with an empty implementation, and the subclass doesn't provide a concrete implementation of the same-named method.

Bug Fix: Fixed a bug that resulted in a false positive type evaluation error when using bidirectional type analysis for a call expression and the return type of the call contained a union of a TypeVar and another type and the expected type contained a union with at least one literal type.

Bug Fix: Fixed bug that resulted in confusing error message when dataclass field was annotated with Self and then the class was subclassed.

Enhancement: Improved the logic that handles instantiation of a custom metaclass when the name of the new class is passed as a string literal to the metaclass constructor.

Enhancement: Improved the bidirectional type inference logic for lambdas to handle the case where one or more of the matching parameter types was a TypeVar.

Bug Fix: Fixed a bug in the parser that resulted in a false negative when using an assignment expression (walrus operator) in the if clause of a list comprehension with no surrounding parentheses.

Enhancement: Added support for bidirectional type inference when an await operator is used in an expression.

Bug Fix: Fixed a bug in the logic that handles classes that are constructed from custom metaclasses.

Enhancement: Added provisional support for the proposed "typing.reveal_type" call.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.