github microsoft/pyright 1.1.304
Published 1.1.304

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

Bug Fix: Fixed recent regression that led to a false positive error when useLibraryCodeForTypes was false and an import of the form from a.b import c targeted a namespace package a.b that contains a traditional package c.

Bug Fix: Fixed bug that resulted in incorrect type narrowing for case statements that involved sequence patterns when the subject included a recursive type alias.

Enhancement: Added support for functools.partial when the provided function is overloaded.

Bug Fix: Fixed bug that resulted in a false positive when evaluating the types of nested generic function calls when bidirectional type inference is required.

Bug Fix: Fixed bug that resulted in an unresolved Unknown type in a doubly-nested loop when the value comes from a call to an overloaded function or magic method.

Enhancement: Improved type inference for enum values in an enum class created with the one-line form x = Enum("x", "a b c").

Bug Fix: Improved error handling for enum classes created with the one-line form x = Enum("x", "a b c"). The code now handles other whitespaces and commas and properly checks for format strings.

Enhancement: Added support for other functional Enum calls including a list of strings, a tuple of strings, a list of tuples, a tuple of tuples, and a map.

Enhancement: Added support for type evaluation of lambdas that are immediately called. The inferred types of the lambda's parameters must be inferred from the argument types in this case.

Bug Fix: Fixed recent regression that causes a false positive when a variable is assigned an expression of ... within a type stub file and strict type checking is enabled.

Bug Fix: Fixed a bug that leads to a false positive error when evaluating the type of a method that contains a function-scoped ParamSpec when the method is partially specialized through a binding operation.

Enhancement: Improved overload filtering for constructor calls when the class defines no __init__ but does define an overloaded __new__.

Enhancement: Added limited support for type narrowing of subexpressions of the subject expression for match statements. In particular, added support for discriminated TypedDicts and tuples that are discriminated on literals.

Enhancement: Enhanced type narrowing in the negative (not matched) case for sequence pattern matching when the subject is a tuple of known length. In cases where the pattern narrows one tuple entry in the positive case, we can eliminate that subtype in the negative case.

Enhancement: Enhanced type narrowing for pattern matching in cases where the subject is a tuple expression and one of the entries is a subexpression that is later used in a case statement block.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.