Published 1.1.326
Bug Fix: Fixed a bug in the recently-introduced deprecateTypingAliases
feature that resulted in false positives when Counter
, OrderedDict
and ChainMap
were imported from collections
.
Bug Fix: Fixed a bug that led to a false positive when an enum literal annotation is used within the enum class definition and from __future__ import annotations
is in use.
Bug Fix: Added code to mark symbols as accessed if they're imported directly into a class scope using a from x import y
statement.
Bug Fix: Fixed a bug that resulted in a false positive error when assigning an unpacked TypeVarTuple to an unpacked tuple[Any, ...]
in an invariant context.
Bug Fix: Fixed bug that results in a false positive error during protocol matching when a NamedTuple is matched against a protocol using _fields
or other attributes defined in the NamedTuple
class.
Bug Fix: Fixed bug that led to a false positive error when determining whether the target of an awaited call is a NoReturn
.
Behavior Change: Changed the default of useLibraryCodeForTypes
from false to true in the LSP settings. (It was changed to true in all other places previously, but this case was missed.)
Bug Fix: Fixed a bug that led to an incorrect type evaluation in certain cases where a type argument for a function call argument type is left unspecified (and is therefore assumed to be Unknown).
Bug Fix: Fixed a bug that led to incorrect type narrowing for isinstance
when the pre-narrowed type is a generic callable.
Bug Fix: Improved determinism of bidirectional type inference for dictionary, list, set and tuple expressions when the expected type is a union of types that includes more than one plausible candidate. The types in the union are now sorted so type evaluation doesn't depend on the order in which the union was defined.
Enhancement: Updated typeshed stubs to the latest version.
Bug Fix: Fixed bug that led to a false negative when @typing.deprecated
is used on an async function.
Bug Fix: Fixed a bug that led to the incorrect type evaluation of a constructor call when bidirectional type inference is used and the expected type is a union that includes more than one compatible instance type.
Bug Fix: Fixed a deviation from the PEP 702 spec which indicates that when @deprecated
is applied to an overloaded function implementation, that deprecation is meant to apply to all overloads.
Enhancement: Improved error message for deprecated methods.
Enhancement: Improved "no matching overloads" error message in cases where an argument is unpacked.
Enhancement: Added support for custom metaclasses that inject instance variables into the classes they construct.