Enhancement: Added support for exception group syntax introduced in PEP 654.
Bug Fix: Fixed bug that resulted in false positive errors when using a TypeVar within the new callable syntax within a function declaration.
Enhancement: Added missing check mandated by PEP 544, which disallows an assignment of a class type to a Type[Proto] if the class type is a protocol itself.
Enhancement: Added support for class types that satisfy protocols. This is specifically allowed in PEP 544 in the section titled "Type[] and class objects vs protocols".
Enhancement: Added support for assigning a param spec to a ...
signature, since the latter is the Any
equivalent for ParamSpecs.
Behavior Change: Changed type logic to allow type
to be assigned to Type[T]
. In this case, type
is treated the same as Type[Any]
, so T
receives a value of Any
.
Enhancement: Added support for __getattr__
and __getattribute__
overloads that are typed with a literal str representing the attribute name.
Bug Fix: Fixed bug in handling of callable syntax when a TypeVar, ParamSpec or TypeVarTuple was used outside of an appropriate scope. No error was emitted in this case.
Bug Fix: Fixed a bug in the handling of the new callable syntax when it's used with an "async" keyword. The resulting return type should be Awaitable
rather than Coroutine
.
Behavior Change: Changed the behavior of the new callable syntax to not accept ...
with other parameters. After further discussion on the typing-sig, the consensus is that supporting this will cause confusion.
Bug Fix: Fixed a false negative (missing) error when a method within a generic class was annotated to return a generic type of itself.
Enhancement: Added logic to handle the case where a declared return type of a function includes a constrained TypeVar and a return statement is guarded by a conditional check that guarantees that the constraint is met on that code path.
Enhancement: Improved error message (and reduced cascading errors) for the case where a variable is incorrectly used as the LHS of a subscript expression within a type annotation.