npm pyright 1.1.256
Published 1.1.256

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

Enhancement: Improved error message generated when comparing two functions that return TypeGuard return types with incompatible types.

Bug Fix: Fixed false positive that occurs when overriding an abstract method (e.g. a property) with a field from a named tuple when both are used as base classes.

Behavior Change: Moved annotationNotSupported diagnostics under the reportGeneralTypeIssues diagnostic rule so they can be disabled.

Bug Fix: Fixed bug in isinstance type guard logic that resulted in incorrect narrowing when using a dynamic type or types for the second argument.

Bug Fix: Fixed a bug that resulted in a false positive when applying issubclass type narrowing from a type to an abstract class.

Bug Fix: Fixed a few inconsistent behaviors with incompatible redeclaration reporting. In particular, it's now OK to reassign a function if the assigned value is a compatible function. Also tightened up the special-casing for the symbol _, which is allowed to be redeclared only in the case where both declarations are functions (def statements). This exemption is provided for the single dispatch use case.

Bug Fix: Fixed a bug in the handling of dataclass where an existing __eq__ method was being overwritten by a synthesized variant. The same was true for other comparison operators.

Bug Fix: Fixed bug that resulted in a false positive error when handling a generic TypedDict with a literal type argument.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.