sublimelsp / LSP-pyright

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

chore(deps): bump pyright from 1.1.358 to 1.1.359 in /language-server #321

Closed dependabot[bot] closed 4 months ago

dependabot[bot] commented 4 months ago

Bumps pyright from 1.1.358 to 1.1.359.

Release notes

Sourced from pyright's releases.

Published 1.1.359

Enhancements:

  • Expanded support for len(x) == L type guard pattern (where x is a tuple) to support <, <=, > and >= comparisons as well.
  • Improved some diagnostic messages, moving away from the term "member" to prefer "attribute". Switched from "cannot assign to type" to "incompatible with type" for consistency and clarity.
  • Extended type narrowing logic for in and not in operators that target TypedDicts to also support constrained TypeVars that use TypedDicts as value constraints.
  • Added a check for the case where a frozen dataclass overrides a field from its parent class but doesn't provide a default value (where its parent does). This can result in a type violation if the parent's default value is not compatible with the child's (covariant) field type.

Behavior Changes:

  • Changed behavior when evaluating the upper bound expression, value constraints expression, or default expression for a PEP-695 type parameter. At runtime, these are always evaluated in a deferred manner even if they are not quoted. Pyright now follows the runtime behavior.
  • Modified handling of annotated self parameter in __init__ method when evaluating constructor call so pyright conforms to the latest typing spec.
  • Added missing check for the errant use of class-scoped type variables in a type annotation for the "self" parameter within an "init" method. The typing spec now clarifies that this is illegal and should generate an error.
  • Updated logic for converting a class constructor to a callable to conform to the newly-updated typing spec.
  • Changed the behavior when invoking constructor for type[T] where T is a TypeVar with no explicit upper bound (and therefore has an implicit upper bound of object). According to the newly-clarified typing spec, this should enforce the constructor signature of object.
  • Modified behavior in constructor call code that previously applied some (now non-compliant) heuristics to reconcile a metaclass __call__ method with a __new__ method. The new behavior is now compliant with the typing spec.
  • Changed behavior of conversion from class constructor to callable to conform with the typing spec in the case where the __new__ method of the class returns a value that indicates the __init__ method should be ignored.
  • Changed behavior of conversion from class constructor to callable to conform to honor the annotated type of self in the __init__ method.
  • Changed behavior of conversion from class constructor to callable to conform to honor return type of the __new__ method.

Bug Fixes:

  • Fixed a bug that leads to inconsistent behaviors when an assignment leads to a type violation. When assigning to a local variable, the target expression is not "narrowed" to include the assigned type in this case. The new behavior applies this same behavior when assigning to instance or class variables.
  • Fixed recent regression that results in a false positive error when applying a @property decorator to a method that has already had a decorator applied to it.
  • Fixed bug that results in a spurious reportAbstractUsage error when an abstract class is captured through a type[T].
  • Fixed bug that results in incorrect type evaluation when solving a ParamSpec type when there are multiple constraints provided.
  • Fixed a bug that results in incorrect type evaluation when assigning a function with a NoReturn return type to a Callable[..., T].
  • Fixed a bug that leads to a false negative when an unparenthesized assignment expression is used in a dictionary key within a dictionary expression or comprehension.
  • Fixed bug that results in false positive error under certain circumstances that involve unions of TypeVars in an invariant context.
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)
github-actions[bot] commented 4 months ago

Following are the schema changes in the new version. Make sure that those are reflected in LSP-pyright.sublime-settings and sublime-package.json files.

No updates done to sublime-package.json.