npm pyright 1.1.302
Published 1.1.302

latest releases: 1.1.389, 1.1.388, 1.1.387...
19 months ago

Bug Fix: Fixed bug that resulted in a false positive "partially unknown" error when using an augmented assignment targeting a subscripted expression within a loop.

Bug Fix: Fixed regression in CLI version that caused the default stubsPath value to stop working. This regression didn't affect the language server code paths.

Bug Fix: Fixed a bug that caused an overload function with a missing return type annotation (and a placeholder body) to have an inferred return type of None when it should be Unknown.

Enhancement: Added support for negative (fall-through) type narrowing for mapping patterns used in a case statement when the subject type includes a TypedDict with a discriminated field type (i.e. a field whose value is limited to a particular literal value).

Bug Fix: Fixed bug in constraint solver that results in incorrect code being emitted when overriding a method that includes multiple keyword-only parameters.

Bug Fix: Fixed bug that led to inconsistent behaviors when attempting to assign callable with a tuple parameter where the tuple was of indeterminate length. Previously, this generated an error if the source type parameter was a tuple with zero elements.

Enhancement: Added support for type guards of the form x[I] is B and x[I] is not B where x is a tuple and B is a boolean literal True or False or an enum literal.

Enhancement: Implemented PEP 698 (@OverRide) support for methods decorated with @property decorator.

Bug Fix: Fixed a bug that resulted in a false negative when a self or cls parameter has an incorrect type annotation (not a subtype of the containing class) in an overloaded method.

Bug Fix: Fixed a bug that led to a false positive error when evaluating a call expression that accepts multiple generic callables, at least one of which is parameterized by a ParamSpec, where the generic types of the callables interact when being solved.

Performance: Fixed an issue that resulted in an unnecessary use of memory when transforming certain types that include TypeVars.

Bug Fix: Fixed a bug that led to a false positive when a generic function was passed as an argument to another generic function multiple times. In such a case, the second (and subsequent) instances of the function must be given unique type parameters so they are distinguished from other instances of the same function.

Bug Fix: Changed the evaluated type of an exception group from ExceptionGroup to BaseExceptionGroup.

Bug Fix: Improved type inference for unpacking of tuples that include unpacked tuples whose lengths are unknown.

Bug Fix: Fixed a bug that led to a false positive error when calling a constructor using bidirectional type inference on a generic class that defines a __new__ method but no __init__ method.

Bug Fix: Fixed bug that resulted in a false negative when Never is used as a type argument for an invariant type parameter.

Bug Fix: Fixed a bug that led to a false positive error when applying bidirectional type inference to a call expression that invokes a generic function where the return type includes a generic class with multiple type arguments, some of which are supplied by the expected type and some of which are not.

Bug Fix: Fixed bug that resulted in incorrect type narrowing in the negative (fall-through) case for certain value patterns in a match statement.

Enhancement: Updated typeshed stubs to the latest version.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.