sublimelsp / LSP-pyright

Python support for Sublime's LSP plugin provided through microsoft/pyright.
MIT License
131 stars 13 forks source link

chore(deps): bump pyright from 1.1.335 to 1.1.336 in /language-server #282

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps pyright from 1.1.335 to 1.1.336.

Release notes

Sourced from pyright's releases.

Published 1.1.336

Bug Fixes:

  • Fixed bug that results in an incorrect type evaluation when functools.partial is used with a constructor where type[Self] is passed as the first argument.
  • Fixed bug that resulted in a crash during type analysis.
  • Fixed bug that results in false positive when indexing an enum class.
  • Fixed a bug that led to a false positive error when calling the same generic function multiple times in a call expression. This bug specifically affected the case where the generic function used PEP 695 syntax.
  • Fixed a bug that led to a false negative when a subclass overrides a parent class with an overloaded method in an incompatible manner.
  • Fixed bug in the import resolver that allowed typeshed stubs and stub files within installed third-party libraries to take precedence over local modules.
  • Fixed a bug that leads an incorrect type evaluation when binding a magic method (like __add__) to self when the magic method returns Self.
  • Fixed a bug that resulted in an incorrect type evaluation when accessing a property that returns Self or type[Self].
  • Fixed bug that resulted in incorrect type evaluation of a symbol imported twice by two redundant wildcard imports.
  • Fixed a bug that leads to a false positive reportPrivateUsage diagnostic when importing a public symbol from a "py.typed" library if that symbol is imported from a private symbol (and re-exported publicly) within the library.
  • Fixed a bug that led to incorrect type evaluation when an inferred method return type includes a union where the subtypes are conditioned on constraints of a constrained TypeVar that parameterizes the class. In this case, one or more of these subtypes should be eliminated when a specialized class is bound to the method.
  • Add support non english works in docstring arguments.
  • Fix bug in the contravariant return type check where a contravariant used in a union was not reported.

Behavior Changes:

  • Changed behavior when converting a class to a callable. If the class has no __init__ or __new__ method in its class hierarchy (other than those provided by object), pyright previously converted the constructor to a signature of (*args: Any, **kwargs: Any). It now converts it to a signature of () (i.e. no params) unless it's a type[T] or a protocol class.
  • Modified the isinstance type narrowing logic to retain a TypeVar when narrowing in the positive case and the value is not a constrained TypeVar.

Enhancements:

  • Added "metacls" as an allowed name for the "cls" parameter in a metaclass __new__ method.
  • Improved pyright's enforcement of keyword arguments passed within a class statement when the class has no custom metaclass or __init_subclass__ in its hierarchy. In this case, the object.__init_subclass__ method applies, and it accepts no additional keyword arguments. Also improved the error reporting for __init_subclass__ in general.
  • Improved handling of + operator when both operands are tuples. It now produces a more accurate type when one (but not both) of the two tuples is of indeterminate length.
  • Updated typeshed stubs to the latest version.
  • Added code to CLI to verify file specs passed on the command line. If they don't exist, emit an error and a non-zero exit code.
  • Improved check for second argument to isinstance and issubclass so non-runtime-checkable protocol classes are rejected.
  • Added special-case handling x in y narrowing logic for the case where x is a dict or Mapping and y is an iterable of TypedDicts.
  • Added check for the use of contravariant TypeVars in an inferred return type.
Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)