Bug Fix: Fixed a bug that results in a false positive when calling a generic function that has a declared return type of a tuple and the call has an expected type (bidirectional type inference).
Enhancement: Enhanced reportIncompatibleMethodOverride
diagnostic check to support cases where the overridden function is overloaded. Attempted to duplicate the same logic that's in mypy for compatibility.
Bug Fix: Fixed a bug that resulted in a false positive in certain obscure cases involving callables with parameters that are typed using TypeVarTuples.
Bug Fix: Fixed a bug that led to false positive errors when a generic function was called in a nested manner (i.e. invoked as in an argument expression).
Bug Fix: Fixed a bug that resulted in the incorrect return type inference for an async function that has no type annotations.
Bug Fix: Fixed bug that resulted in a false positive error when using a nested Literal
that includes None
.
Bug Fix: Fixed a bug that led to extremely long (effectively infinite) evaluation times when a generic function was passed as an argument to itself.
Behavior Change: Changed the matching of an unpacked dictionary passed as an argument to a callable when keyword arguments are present and have default values. Previously, the types of all such parameters were not checked against the unpacked dict type (under the assumption that the default argument would satisfy the parameter in this case). The new behavior matches that of mypy and assumes that the unpacked dict may supply arguments for all otherwise-unmatched keyword parameters even if they have default argument values.
Enhancement: Added auto-exclude logic specifically for typeshed so stdlib stubs that are not "in scope" for the current python version are auto-excluded from the project. This applies only if the typeshedPath
is set to .
.
Bug Fix: Fixed issue that caused a false positive error in typeshed CI due to nondeterministic handling of circular dependency in ReprEnum
class.
Bug Fix: Fixed a bug that led to a false positive error when validating the consistency of the return type of a generator function if the return type declaration was not specifically Generator
or Iterable
(or their async counterparts).
Bug Fix: Fixed a false negative type error involving a recursive type alias that includes a Sequence
and a str
(which is itself a recursive type involving Sequence
).
Bug Fix: Fixed a bug that led to a false positive error when a call expression was used on the RHS of an "or" or "and" operator and the target callable involved an overload with a function-scoped TypeVar in the return type.
Bug Fix: Fixed a bug in the tokenizer that led to an incorrect error for an f-string that ends in a double backslash.
Bug Fix: Improved evaluation of nested calls that involve the same generic function or multiple uses of the same generic function as arguments to the same call. In these cases, the generic signatures need to be made unique so the type variables of each are treated as though they are independent.
Enhancement: Updated typeshed stubs to the latest version.