Published 1.1.196
Enhancement: Added support for Python 3.11 StrEnum.
Behavior Change: Modified behavior for assignment-based type narrowing when the target of the assignment references an "asymmetric" descriptor or property, one where the setter accepts a different value type than the getter returns. When this is detected, assignment-based type narrowing is no longer applied.
Behavior Change: Changed class pattern matching behavior to support narrowing of Any
or Unknown
, exempting this case from the general "never narrow Any" rule.
Behavior Change: Modified behavior of overload matching when unpacked argument is present and the unpacked iterator is a type that doesn't provide any length information. In this case, overload matching will prefer an overload that includes a *args
parameter rather than individual positional parameters.
Enhancement: Added check for a module used as a type annotation, which is not permitted.
Enhancement: Improved isinstance
type narrowing logic to retain type arguments in cases where the corresponding type parameter is bound or constrained.
Bug Fix: Fixed bug that resulted in a false positive error indicating that an overload isn't compatible with its implementation when the overload includes a callable parameter with a type variable as a parameter.
Bug Fix: Fixed a bug in type evaluation of a Final
class variable that has no explicit type but is assigned a literal value.
Bug Fix: Fixed a bug that resulted in incorrect type evaluations when a generic class using a ParamSpec was explicitly specialized using a Concatenate
in the type argument, as in A[Concatenate[int, P]]
.
Bug Fix: Fixed a bug that resulted in incorrect type resolution when evaluating mutually-dependent variables within a loop where one of the expressions involved a call to a constructor with an unpacked argument.
Bug Fix: Fixed false positive error with reportUnnecessaryIsInstance diagnostic check with the provided class is dynamic.