Bug Fix: Fixed a bug that caused a false positive error when using a list comprehension within a method that is overloaded to accept either a LiteralString
or a str
. The incorrect overload was chosen in some cases, picking the LiteralString
variant rather than the str
variant even though LiteralString
variant generated type errors.
Bug Fix: Fixed a bug that caused incorrect type evaluation because of stale module paths that are cached for specific source files. Module paths are dependent on the list of configured import resolution paths, so when the import resolution paths change, we may need to recompute the module path for a source file.
Bug Fix: Fixed a bug that resulted in a false negative when a del
statement targeted a symbol that was unbound (i.e. referenced before assigned) within a function.
Behavior Change: Changed behavior of assert_type
to treat Any
the same as Unknown
for purposes of type comparison. There is no way to express an Any
type explicitly in the Python type system because it is, by definition, an "implicit" Any.
Bug Fix: Fixed a bug that resulted in a false negative when evaluating binary operations that involve unions for either the LHS or RHS or both.
Bug Fix: Fixed bug that resulted in incorrect type evaluation when bidirectional type inference was used along with a type alias that was involved in a circular declaration.
Bug Fix: Fixed a bug that resulted in a false positive error when LiteralString
was used as the base type in an index expression.
Behavior Change: Changed the --verifytypes
command to skip docstring checks for overloads and for property setters and deleters.
Bug Fix: Fixed a bug that resulted in a false positive when evaluating type compatibility of a type that includes an invariant type argument consisting of a union that contains a generic callable.
Enhancement: Enhanced support for handling of functions that return NoReturn
to include support for overloaded functions where some of the overloads return NoReturn
and others do not.
Enhancement: Updated typeshed stubs to the latest version.
Enhancement: Added better verbose logging for the case where an import cannot resolve the source file leading to a reportMissingModuleSource
diagnostic.