1.1.354
版本发布时间: 2024-03-13 23:28:34
microsoft/pyright最新发布版本:1.1.387(2024-10-30 09:17:48)
Bug Fixes:
- Fixed a bug that resulted in an incorrect type evaluation when an augmented assignment is used within an inner-scoped function to add a constant to a variable. Literal math should not be used in this case.
- Fixed two bugs that resulted in false negatives when redefining a constant variable with a non-variable symbol and when redefining a Final variable with a non-variable symbol.
- Fixed bug that results in false positive when a generic class or type alias uses a TypeVarTuple followed by one or more ParamSpecs that have default values.
- Fixed bug that resulted in false negative when narrowing a constrained or bound TypeVar with a
complex()
orfloat()
class pattern. - Fixed bug that results in a false positive under certain circumstances when a constrained TypeVar is used as the default for another constrained TypeVar.
- Fixed a bug that results in a false positive under certain circumstances when defining a type alias using the old
typing.TypeAlias
annotation. - Fixed a bug that results in a false negative when a class explicitly inherits from a protocol that defines an instance variable but the child re-declares as a
ClassVar
without an explicit type. - Fixed a bug that made locale overrides through environment variables no longer work on node 21.
Enhancements:
- Enhanced handling of
type
function when it is passed a class. Pyright previously evaluated this asAny
, but now it returns the class' metaclass. - Added check for generic classes and type aliases that include a TypeVarTuple followed by a TypeVar that has a default value. This is illegal according to PEP 696.
- Changed the behavior when accessing a class attribute from a generic class that is not specialized. The class is now automatically specialized in the case using default type parameter values (from PEP 696) or Unknown. This change is required for conformance with PEP 696.
- (From pylance) Added some optimizations to the tokenizer to reduce memory usage.
- Added new
reportUnhashable
diagnostic rule.
1、 vscode-pyright.vsix 4.89MB