Bug Fix: Fixed a bug that resulted in incorrect type narrowing when using an in
expression and the LHS operand is of type type
. This situation requires some special casing.
Bug Fix: Fixed a bug in the handling of generic type aliases that are parameterized by ParamSpecs in the case where an explicit type argument is not provided. The type argument should default to ...
in this case.
Bug Fix: Fixed bug in the expression printer. It was not properly handling a minimal slice (:
). This affected certain logging output.
Performance: Added optimization for slice expression evaluation. It can be skipped in cases where the we are speculatively evaluating the type.
Performance: Implemented optimization for type evaluation for index expressions. In cases where there are multiple subexpressions separated by commas, we can skip the check for the __index__
magic method.
Bug Fix: Fixed a bug that resulted in incorrect isinstance
type narrowing when one or more of the filter classes was decorated with a class decorator.
Enhancement: Added support for context managers whose __exit__
method is declared to return "Literal[False]". This is now treated the same as if it is declared to return "None".
Performance: Improved performance of type evaluations in certain cases where a union contains multiple types whose class hierarchy contains one or more unknown types.
Bug Fix: Fixed recent regression that resulted in attribution of a type var to the wrong scope when it was used in an __init__
method of a class with a class decorator.
Bug Fix: Fixed bug that results in incorrect type evaluation when a function with a **kwargs
parameter is captured by a ParamSpec in certain circumstances.
Bug Fix: Fixed bug that resulted in incorrect type evaluation for values within a TypedDict that derives from a TypedDict that has been specialized.
Bug Fix: Fixed a bug that results in a spurious "argument type is unknown" diagnostic when an unannotated variable used within a loop is also used as the subscript for an index expression.
Bug Fix: Improved handling of incomplete types passed as arguments to magic methods.
Bug Fix: Fixed a bug that resulted in infinite recursion when using auto variance inference with certain recursive types.
Enhancement: Added more complete type validation for __getattr__
, setattrand
delattr` methods.
Bug Fix: Fixed a bug that resulted in a false positive when resolving a symbol from a multi-part import when a short form of that same multi-part import was also imported.