1.1.386
版本发布时间: 2024-10-23 08:36:39
microsoft/pyright最新发布版本:1.1.387(2024-10-30 09:17:48)
Bug Fixes:
- Fixed issue that results in non-deterministic false positive error, often relating to the "awaitable" check.
- Fixed bug that results in a false positive error when using a traditional generic type alias defined with a "naked" type variable surrounded by
Annotated
within a Python 3.12type
statement. - Fixed a bug that leads to a false positive when using asssert_type with a **kwargs parameter that is annotated with an unpacked TypedDict.
- Fixed recent regression that results in a spurious type error when accessing an instance variable
self.x
ifx
has the type of a class-scoped type variable with a default value. - Fixed a recent regression that results in false positive errors under certain circumstances that involve assignability checks for two callables that involve a
*args: *tuple[]
parameter. - Fixed bug that results in a false positive when resolving a multi-part import target that involves a circular dependency.
- Fixed regression that results in a false positive error (and an error that is reported at a bogus location) when overriding a dataclass field with a converter.
- Fixed bug in constraint solver that resulted in behavior that differed depending on the order of methods in a protocol.
- Fixed a bug that results in a spurious error when specializing an old-style generic type alias whose type is defined as a new-style type alias that has multiple type parameters, only some of which are used in its type definition.
- Fixed bug that leads to incorrect type narrowing in the negative ("else") case when using
isinstance
with a filter type that is typed astype[X]
. - Fixed bug that results in a false negative when the specialization of a ParamSpec results in a signature that has a duplicate parameter name where one parameter has a default value and the other does not.
Enhancements:
- Added a limit to the number of typed declarations that will be evaluated for a single symbol. This mitigates performance issues with code that redeclares a symbol hundreds or thousands of times.
- Updated support for "closed" TypedDict to match latest updates to PEP 728.
- Enhanced the
type(y) == x
type guard logic to support the case wherey
is declared as a type variable with an upper bound that overlaps with the type ofx
. - Updated typeshed stubs to the latest version.
- Updated toml parser library to support toml 1.0.0 syntax.
- Removed the limitation that the "ignore" setting in a config file must be relative to the project root.
1、 vscode-pyright.vsix 5.28MB