npm pyright 1.1.387
Published 1.1.387

7 hours ago

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 or not in operator to be bool if the LHS doesn't support containment. Previously, the expression evaluated to Never.
  • 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() of TypedDict 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.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.