Published 1.1.209
Enhancement: Added support for "literal math" for certain unary and binary operations where the operands are all the same literal class types (str, bytes, int, or bool). For example, Literal[0, 1]
+ Literal[1, 2]
results in type Literal1, 2, 3]
.
Enhancement: Implemented a new diagnostic check "reportMissingSuperCall" that checks for __init__
, __init_subclass__
, __enter__
and __exit__
methods that fail to call through to their parent class(es) methods of the same name. This is a common source of bugs. The check is disabled by default. We may eventually enable it by default in strict mode, but we want to get feedback before doing so.
Behavior Change: Changed text output of CLI version to use the word "information" rather than "info" for consistency with JSON output.
Bug Fix: Fixed bug that resulted in a crash if Self
was used in a type argument within a method decorator.
Behavior Change: Changed behavior to allow Self
to appear within a ClassVar
type.
Bug Fix: Fixed bug that resulted in an incorrect type evaluation when Self
was used as a return type annotation for a property or class property.