Enhancement: Added support for very large integer literals (both in the tokenizer/parser and in the type system for Literals).
Bug Fix: Fixed bug where call to async function that returns NoReturn
was treated as a "no-return" function even though it wasn't awaited.
Enhancement: Added check for class or instance variables that are declared but not assigned in a protocol class and not assigned in a concrete class that explicitly derives from the protocol class.
Bug Fix: Fixed bug in type narrowing logic for isinstance
calls where the input value includes a Callable
and the class list includes a class that is not a runtime-checkable protocol class. In this case, the Callable
should not be removed in the negative ("else") case even if the class defines a compatible __call__
method.
Bug Fix: Fixed bug that resulted in a false positive error when assigning a value to a TypedDict with not-required keys when that key had previously been assigned a literal value that narrowed the type.
Behavior Change: Reverted recent change to TypedDict where the single-argument form of get
was removed for not-required fields. This caused problems because there is a fallback overload that accepted this case still.
Behavior Change: Changed reportUnknownArgumentType
diagnostic check to be suppressed if the argument is an empty list or dict that comes from a []
or {}
expression. While these types do technically contain Unknown
type arguments, they are not unsafe, so reporting a diagnostic here is just noise.
Behavior Change: Changed the implementation of reveal_type
so it no longer returns a literal string type but now accepts optional keyword arguments expected_text
and expected_type
. The return type of reveal_type
is now the same as the type of the first argument, making it consistent with mypy's implementation of reveal_type
.
Enhancement: Modified error messages for Required and NotRequired for clarity.
Bug Fix: Fixed bug in parser that resulted in a false negative error when using an assignment expression within a subscript. This is allowed in the grammar as of Python 3.10.
Enhancement: Updated typeshed stubs to the latest.
Bug Fix: Fixed internal crash caused by infinite recursion.
Bug Fix: Fixed bug that caused a crash in functools.partial special-case logic.
Bug Fix: Fixed bug in type evaluation of index expressions that involve a recursive type alias in the subscript. Also improved text version of expanded types that include recursive type aliases.