github microsoft/pyright 1.1.221
Published 1.1.221

latest releases: 1.1.370, 1.1.369, 1.1.368...
2 years ago

Behavior Change (from Pylance): Auto-exclude any folder under workspace starting with a period.

Bug Fix: Fixed a bug in type narrowing for match statement. It was not properly handling None literal patterns when narrowing in the negative case.

Bug Fix: Fixed bug that leads to a false positive error when using a class whose constructor doesn't contain any type annotations. Pyright treats such classes as though they are generic to help with inference of instance variables initialized in the constructor, but it shouldn't enforce the variance of the under-the-cover type variables.

Bug Fix: Fixed bug that resulted in a false positive when evaluating certain list comprehensions where the subexpressions had interdependencies.

Bug Fix: Fixed bug that resulted in a false positive error when evaluating type compatibility between two callables that included an *args parameter plus a set of keyword-only parameters.

Enhancement: Updated typeshed stubs to the latest version.

Enhancement: Added support for PEP 675 (arbitrary literal strings).

Bug Fix: Added support for multiple unpack operators in a tuple list without parentheses when used in the RHS of a for statement. This was a grammar change introduced in Python 3.9.

Enhancement: Improved completions for class member access when the member variable in a child class is unannotated but a parent class provides an annotation. In this case, we should use the type information from the annotated symbol.

Behavior Change: Changed the behavior of the package type verifier so it does not flag unannotated class or instance variables if a parent class provides a type annotation for a variable of the same name. The type is inherited in this case. Also updated the library guidance to reflect this change.

Bug Fix: Fixed bug that resulted in an incorrect type evaluation when handling a namedtuple call with a second parameter that is dynamic (not statically known).

Enhancement: Improved support for namedtuple when the second argument is a tuple of string literals. It's more common to pass a list of string literals, but tuples should work as well.

Bug Fix: Reverted a recent bug fix that caused significant performance degradations and crashes under some circumstances.

Enhancement: Added special-case check for new callable syntax used within a quoted annotation passed as a bound or constraint argument to a TypeVar constructor.

Bug Fix: Improved symbol resolution of module imports within the code flow engine when determining whether a context manager swallows exceptions or a callable returns NoReturn.

Performance: Mitigated performance issue that results when doing a type compatibility check between two distinct recursive type aliases.

Bug Fix: Fixed incorrect type evaluation when evaluating a constructor call with bidirectional type inference when the expected type is generic.

Bug Fix: Fixed bug that resulted in incorrect type evaluation when a generic class with constrained type parameters was explicitly specialized with a subclass of one of the constrained types.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.