Skip to content

Published 1.1.151

Compare
Choose a tag to compare
@erictraut erictraut released this 20 Jun 15:16
· 4241 commits to main since this release

Enhancement: Added support for metaclasses that support the __getitem__, __setitem__ and __delitem__ magic methods, allowing classes that derive from these metaclasses to be used in index expressions.

Bug Fix: Fixed bug that caused dataclass usage to break in Python 3.6 and older when using the polyfill library.

Enhancement: Added conditional type support for __setitem__ so a value with a type defined by a constrained TypeVar can be assigned to an index expression.

Bug Fix: Fixed bug that caused a crash in the tokenizer when encountering a string literal that is extremely long (>100K in length).

Bug Fix: Fixed bug caused by a variable assignment with a list expression on the RHS that was interpreted temporarily as a type alias declaration. Added more sanity checking on the type of the assigned expression for type aliases.

Bug Fix: Fixed type evaluation bug where Callable is used to annotate an input parameter, and the Callable return type is a union that contains a type variable.

Bug Fix: Fixed bug in constraint solver relating to replacement of return type of the form T when matching was performed against Type[T].

Enhancement: Added support for __builtins__ module symbol symbol.

Enhancement: Added support for type narrowing conditional expressions of the form a is False, a is True, a is not False and a is not True.