github microsoft/pyright 1.1.301
Published 1.1.301

latest releases: 1.1.381, 1.1.380, 1.1.379...
18 months ago

Bug Fix: Fixed bug that caused diagnostic for implicit override to be reported as part of reportGeneralTypeIssue rather than `reportImplicitOverride.

Bug Fix: Fixed recent regression that caused a crash in the signature help provider.

Bug Fix: Fixed bug that resulted in false positive "incompatible variance" error when covariant and contravariant type variables were used in certain combinations when defining a generic class.

Enhancement: Added support for argument dictionary unpacking when the type of the unpacked object supports the SupportsKeysAndGetItem protocol. Previously, the object needed to be an explicit subclass of Mapping.

Bug Fix: Fixed a bug that led to the incorrect evaluation of a symbol imported through a from a.b import c statement if a.b is a non-py.typed library, useLibraryCodeForTypes is false and c was also the name of a submodule of a.b. In this case, the evaluated type of c should be Unknown, but it was incorrectly evaluated as a module type.

Behavior Change: Reduced verbosity of CLI output for non-error conditions.

Enhancement: Added support for a TypeGuard function where the first argument is a TypeVar. In this case, the resulting (narrowed) type should be a conditional type that references the TypeVar.

Bug Fix: Added support for "naked" ClassVar used to annotate a class variable that is assigned a descriptor object but is later set through an object member access. This previously resulted in a false positive error.

Enhancement: Added support for synthesized __slots__ symbol in dataclasses that are constructed using the slots=True argument.

Bug Fix: Fixed bug that resulted in an false positive error when using a class (and by implication, its constructor) as an input to a generic function (e.g. a decorator) that is parameterized with a ParamSpec.

Bug Fix: Fixed a bug that resulted in a false negative when using a type variable with an incompatible variance to specialize a generic class that uses a TypeVarTuple.

Bug Fix: Fixed bug that resulted in a false positive error when doing protocol matching where the object type (i.e. the self value) is a literal value.

Behavior Change: Tweaked the type constraint solver's "scoring" mechanism to ensure that functions and function overloads are always scored as "more complex" than classes, objects and unions thereof.

Performance: Fixed issue that resulted in unnecessary caching (and therefore unnecessary memory usage) for instances of types that are already considered instances, such as Any and Unknown.

Bug Fix: Fixed a bug that resulted in spurious type evaluation errors when dealing with classes that have synthesized symbols such as dataclasses, namedtuples and TypedDicts.

Bug Fix: Fixed bug that led to a false positive error when a TypeVar was bound to StringLiteral and conditionally narrowed.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.