github microsoft/pyright 1.1.124
Published 1.1.124

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

Bug Fix: Fixed bug where a keyword parameter with a generic type (a TypeVar) and a default value of "..." caused the TypeVar to be assigned a value of "Any".

Bug Fix: Fixed recent regression that caused certain diagnostics to be suppressed when calling a constructor with an expected type.

Enhancement: Added missing check indicated in PEP 589 for TypedDict fields that override a parent class field by the same name with a different type.

Bug Fix: Added support for TypeVar where the bound or constrained types are literals.

Behavior Change: Changed "stubPath is not a valid directory" logging from an error to a warning. The fact that the value defaults to "typings" and most users don't have a typings folder results in confusion, so a warning is more appropriate here.

Enhancement: Updated typeshed stubs.

Bug Fix: Fixed bug that resulted in false negatives when a generic class was used within a subscript (e.g. within the type argument of another type) and no type arguments were specified for the generic class. This also resulted in such types not properly getting default values. For example, in the expression Union[int, Callable], the Callable was not being interpreted as Callable[..., Unknown].

Enhancement: Improved error message for partially-unknown lambda type.

Bug Fix: Fixed a bug in the logic for inferring the type of list expressions when the expected type is "object".

Bug Fix: Improved handling of bidirectional inference for call expressions when the expected type contains a union of literals and the function returns a generic type.

Enhancement: Added new check for a common source of bugs where an equals operator within an if statement compares two values whose literal types do not overlap and will therefore never evaluate to True.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.