1.1.277
版本发布时间: 2022-10-26 11:22:14
microsoft/pyright最新发布版本:1.1.387(2024-10-30 09:17:48)
Enhancement: Added support for falsy type guard expressions when the evaluated type is a NamedTuples with at least one element. These always evaluate to True.
Bug Fix: Fixed bug that resulted in a false positive "possibly unbound" error when a builtin symbol is overridden in the global scope within a conditional block.
Enhancement: Improved error message for TypeVar constraints that contain generics. Fixed a bug that prevented an error message when keyword argument was duplicated in a call to TypeVar
.
Enhancement: Added support for infer_variance
parameter to TypeVar
as specified in draft PEP 695.
Bug Fix: Improved consistency of assignment-based type narrowing when the type of the assigned value includes an Any
or Unknown
type argument that is nested more than one level deep and the expected (declared) value contains a type argument that is not Any
.
Enhancement: Updated typeshed stubs to the latest version.
Bug Fix: Fixed bug that results in a false positive error when a protocol class implements an overloaded method.
Bug Fix: Added a workaround for a recent change to the typeshed stub dataclasses.pyi relating to the InitVar
class. For Python 3.8, the stub indicates that the InitVar
class has a metaclass called _InitVarMeta
that has a __getitem__
method that returns a value of type InitVar[Any]
, but this creates a circularity because the evaluation of the expression InitVar[Any]
depends on the return type of _InitVarMeta.__getitem__
.