Performance: Added a faster code path for testing the type compatibility of a non-union type to a union type when the union type contains no unsolved TypeVars.
Performance: Added optimization in overload path that eliminates one extra validation of arguments in the common case.
Enhancement: Updated typeshed stubs to latest version.
Performance: Implemented tighter scoping for contextual evaluation. This improves performance of type evaluation in various use cases including semantic tokens.
Bug Fix: Fixed bug in type narrowing logic for "in" operator. It was not properly handling the case where the reference (LHS) type was a subtype of the container's element type.
Enhancement: Added support for new reportUnnecessaryContains
diagnostic rule to catch potential bugs in in
and not in
containment checks.
Bug Fix: Changed the validation logic for type argument lists when found outside of a type annotation. The normal type annotation restrictions (such as no dynamic variable usage) should not apply in this case.
Bug Fix: Fixed a bug that caused defineConstants
configuration setting not to work with the pyright and pylance VS Code extensions.
Bug Fix: Fixed a bug in the dataclass logic that resulted in incorrect handling of a dataclass field that is annotated both in the class body and (redundantly) in a method within the same class.