Published 1.1.183
Bug Fix: Fixed bug in handling of the recently-added "--skipunannotated" command-line flag.
Bug Fix: Fixed a recent regression that resulted in a false positive error when Union
was used with no type arguments outside of a type annotation.
Enhancement: Extended support for bidirectional type inference for functions that have a generic return type and the "expected type" is a generic class with type arguments that include literal types.
Enhancement: Expanded support for bidirectional type checking for function call expressions where the return type of the function includes a TypeVar that also appears within a function parameter and that parameter is a callable.
Bug Fix: Fixed bug that resulted in incorrect type evaluation for a generic function that returns a specialized class that uses a Concatenate
in one of the type arguments.
Bug Fix: Fixed bug that caused the type of super().__new__(cls)
to be evaluated incorrectly.
Bug Fix: Changed type evaluator to elide NoReturn
from union generated from ternary operator.
Bug Fix: Fixed a bug that allowed a function to be assigned to a (non-protocol) class if that class defined a __call__
method. This should be allowed only for protocol classes.
Bug Fix: Fixed a bug that allowed a function to be assigned to a protocol class if it defined a __call__
method but also defined additional methods or attributes.
Behavior Change: Changed text representation of inferred type of self
and cls
parameters to Self@ClassName
. This is more consistent with the emerging standard for an explicit Self
type.