1.1.387
版本发布时间: 2024-10-30 09:17:48
microsoft/pyright最新发布版本:1.1.387(2024-10-30 09:17:48)
Bug Fixes:
- Fixed bug that leads to a false negative when passing multiple
*args
or**kwargs
arguments to a callable parameterized by a ParamSpec. - Fixed issue that results in a false positive "type could not be determined because it refers to itself" error caused by a false dependency due to narrowing logic. This may also improve type analysis performance in some code.
- Switched to a different toml parser to avoid incompatibility with the latest toml standard.
- Changed the evaluated type of an
in
ornot in
operator to bebool
if the LHS doesn't support containment. Previously, the expression evaluated toNever
. - Fixed a bug that results in a false positive when a class parameterized by a TypeVarTuple is used in conjunction with a Self type.
- Fixed bug that results in incorrect type evaluation when performing protocol matching that involves an attribute with a callable type parameterized by a ParamSpec.
- Added protection for an internal call stack overflow when inferring return types in deep call hierarchies within untyped code.
- Fixed a false positive "incompatible method override" error in a case that involves both class-scoped and method-scoped type variables.
- Fix recent regression that broke hover text on
.get()
ofTypedDict
instance. - Fixed a bug that causes a false positive error when a class uses
type(Protocol)
as a base class.
Enhancements:
- Enhanced type narrowing logic for "x ==
" type guard pattern to handle the case where x
is a type variable with a literal upper bound or value constraints that are literals. - Improved detection of asymmetric descriptors to handle the case where the
__set__
and__get__
methods are overloaded. - Added experimental support for draft PEP 764: Inlined typed dictionaries.
- Changed check in the pyright VS Code extension for the presence of Pylance. If Pylance is installed in the workspace but is not configured to be loaded (i.e. the "python.languageServer" is set to "None"), then pyright will allow itself to be loaded.
1、 vscode-pyright.vsix 5.39MB