Skip to content

Published 1.1.143

Compare
Choose a tag to compare
@erictraut erictraut released this 24 May 17:53
· 4357 commits to main since this release

Bug Fix: Added missing recursion check that resulted in stack overflow in type evaluator.

Enhancement: Added support for unpacked dictionary argument in function calls when the unpacked expression is a TypedDict.

Enhancement: Improved error message for the case where positional-only parameters are used in a function and a caller does not provide enough arguments.

Bug Fix: Improved logic for argument matching for call expressions where the call includes keyword-only parameters and the call expression includes an unpacked list argument.

Bug Fix: Fixed bug in type evaluation of list comprehensions when literal types were involved. The literal types were being widened to their associated non-literal types.

Enhancement: Improved isinstance type narrowing logic to accommodate the case where the first argument to isinstance is a module and the second argument is a runtime-checkable protocol class.

Bug Fix: Fixed regression that caused false positive in the case where a Callable type was used that defined its own TypeVar scope and was later matched against a self parameter in an instance method.

Enhancement: Enhanced "reportIncompatibleVariableOverride" diagnostic check so it applies to instance variables defined within a method (e.g. self.var: str = "") in addition to class variables.

Enhancement: Added type narrowing support for index expressions where the index value is a string literal.

Enhancement: Added support for "tagged union" type narrowing when the conditional expression is of the form x[K] == V or x[K] != V where x is a union of TypedDict objects and K is a literal str key value that refers to a field with a literal type and V is a literal value.