Skip to content

Published 1.1.70

Compare
Choose a tag to compare
@erictraut erictraut released this 10 Sep 18:59

Enhancement: Added support for PEP 585. Standard collection types defined in builtins can now be used like their typing counterparts. This includes "tuple", which needs special-case handling because its class definition in builtins.pyi indicates that it has a single type parameter, but it actually supports variadic parameters.

Bug Fix: Added code to prevent heap overrun errors during parsing/binding, most notably during indexing operations.

Bug Fix: Fixed bug that caused runtime crash if typeshed stubs couldn't be found or didn't define 'tuple'.

Bug Fix: Improved interaction between recursive type aliases and bidirectional type inference for lists and dicts.

Bug Fix: Improved type narrowing for assignments in cases where the destination of the assignment is declared as a union and the assigned type is a narrower form of one of the union elements. Previously, the narrowing logic didn't choose the narrowest type possible in this case.

Enhancement: Added perf optimization for unions that contain hundreds or thousands of int literal values. This is similar to another recent optimization for str literal unions.

From Pylance: Ensure that auto-import doesn't place import statement below usage.