megagonlabs / bunkai

Sentence boundary disambiguation tool for Japanese texts (日本語文境界判定器)
https://pypi.org/project/bunkai/
Apache License 2.0
185 stars 11 forks source link

Bump pyright from 1.1.308 to 1.1.311 #249

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps pyright from 1.1.308 to 1.1.311.

Release notes

Sourced from pyright's releases.

Published 1.1.311

Bug Fix: Fixed regression in f-string tokenization that led to a false positive error when an escape character (backslash) is used with a carriage return or line feed within the non-expression part of an f-string.

Bug Fix: Fixed a bug that resulted in a crash in certain cases within the argument/parameter matching logic.

Bug Fix: Fixed recent regression that led to a false negative when using functools.partial with bidirectional type inference.

Bug Fix: Fixed a bug that led to (temporary) sporadic reportUnnecessaryTypeIgnoreComment errors.

Bug Fix: Fixed a recent regression that affected a function that returned a generic Callable that used type[T] rather than T in the type annotation.

Bug Fix: Fixed a recent regression that resulted in the incorrect evaluation of the value field for an Enum.

Bug Fix: Fixed a bug that led to an unsolved type variable within a union producing an Unknown type in some cases. This triggers false positive errors in strict mode.

Bug Fix: Fixed a bug that allowed unsolved type parameters to "leak" from a __new__ call in some cases.

Bug Fix: Fixed a bug that led to a false positive when a function-scoped ParamSpec was used within a constructor, and a lambda with no parameters is passed to the constructor as an argument.

Bug Fix: Fixed a bug that led to false positive errors for a constructor call used in conjunction with bidirectional type inference for a generic class that includes both a __new__ and an __init__ method.

Bug Fix: Fixed a bug that led to incorrect handling of # type: ignore comments if a file is type checked but then pyright runs low on memory and is forced to dispose of cached parse information. We now precompute the accumulated diagnostics while the cached parse information is available.

Bug Fix: Fixed a bug that led to a crash when running pyright --verifytypes numpy. A pathological case in the numpy code was causing an exponential explosion in the number of type variable signature contexts.

Published 1.1.310

Enhancement: Reimplemented handling of f-strings in accordance with PEP 701, which is included in Python 3.12.0b1. This is a significant change with potential for regressions.

Enhancement: Implemented ReadOnly TypedDict fields to explore proposed PEP 705 variant as discussed in this discussion thread. This prototype will help inform which direction to take with PEP 705.

Bug Fix: Fixed regression that caused an internal assertion (and therefore a crash) when type checking a constructor whose arguments are not type compatible.

Bug Fix: Fixed bug that led to a "leaked" unsolved type variable if a __new__ method used a function-scoped type variable and there was no __init__ method for the class.

Enhancement: A class created with "NewType" should be treated as though it is implicitly @final. The runtime enforces this. Pyright now correctly generates an error if such a class is used as a base class.

Bug Fix: Fixed a false positive error with the reportImplicitOverride check that occurs when the @override decorator is applied to a method that is decorated with a wrapper function that completely replaces the original function with another.

Bug Fix: Fixed places in the pyright code where lists were being expanded on the stack, resulting in a stack overflow (and therefore a crash) if the list is too large.

Enhancement: Added special-case synthesis of the update method for a TypedDict class. For TypedDicts that include at least one read-only field, no updates are allowed. For TypedDicts that are writable, a "partial" type is synthesized that allows for any subset of keys (required or not required) to be passed to the update method.

Behavior Change: Changed protocol matching behavior for protocols that include a variable annotated as ClassVar. A class that defines this same variable as a "regular class variable" (one that is declared at the class level but can be overwritten on a per-instance basis) is now considered compatible with such a protocol.

Behavior Change: Changed type narrowing on assignment for member access expressions that involve an asymmetric __getattr__ and __setattr__ method. As with asymmetric descriptors, it is not safe in this case to assume that the written value will be the same as the read value.

Bug Fix: Fixed a bug that led to a false positive error in certain circumstances with nested call expressions where the expected type of the parameter was a union.

Behavior Change: Changed the behavior when a parameter whose type is a "naked" TypeVar has a default argument value. Mypy doesn't allow this case. Pyright allows it but previously modified the parameter type to be a union of the TypeVar and the type of the default argument. This behavior closed some type validation holes, but it created other problems and was very unintuitive for users. See microsoft/pyright#3130. See microsoft/pyright#2507 for a discussion that led to this original change. This change reverses this behavior. It potentially allows for some unsafe "creative" uses that will go unreported.

... (truncated)

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 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)