This is a hot-fix release to correct a regression introduced in 1.1.297.
Bug Fix: Fixed a regression that resulted in a false positive in some rare cases when attempting to assign a value to a property with a defined setter.
Enhancement: Updated typeshed to the latest stubs.
Published 1.1.297
Enhancement: Extended logic that searches for site-packages directory within a venv to handle the case where multiple /lib/python3.X/site-packages are present. The new logic prefers the configured Python version rather than picking the first one returned by the file system.
Enhancement: Added support for bidirectional type inference for dictionary expressions with dictionary expansion entries.
Bug Fix: Fixed a bug that led to a false positive error when using the | operator with two dicts whose keys or values are defined as literals.
Bug Fix: Fixed a recent regression that resulted in an incorrect type evaluation when using a __new__ method whose return type annotation is Self.
Enhancement: Implemented missing check for generic type alias specialization when too few type arguments are provided.
Bug Fix: Fixed a bug that resulted in a false negative when defining a generic class that derives from another generic class and the type parameter isn't compatible with the variance of the base class.
Bug Fix: Added logic to detect when a type alias is used in a generic class declaration's base class list and a type parameter used with the type alias is incompatible with the variance required for the type alias.
Bug Fix (contribution by Michael Davis): Declare workspaceFolders support in LSP server capabilities.
Performance: Performance optimization: reduced formatting of error messages in cases where it can be determined that they are not needed (e.g. in speculative evaluation code paths).
Bug Fix: Fixed a bug that caused the variance for type parameters to be incorrectly inferred when an auto-variance class derived from a non-auto-variance class.
Enhancement: Added support for type guard patterns type(x) == T and type(x) != T.
Enhancement: Improved error handling for dictionary expressions that use bidirectional type inference when the key type doesn't match the expected type.
Enhancement: Improved handling of typing.TypeAlias so it can be aliased and re-exported from other files.
Bug Fix: If no files are found and no errors are detected but the --outputjson command-line option is used, a json report should still be issued.
Bug Fix: Made JSON parsing stricter for the pyrightconfig.json file. Previously, a JSON syntax error was not detected or reported.
Enhancement: Removed the need for the binder to understand typing.Required and typing.NotRequired special forms. This allows these forms to be imported, re-exported, and aliased.
Bug Fix: Fixed a bug that resulted in an incorrect reporting of "unreachable code" after a call to a generator function that contains an unreachable yield statement.
Performance: Fixed performance issue that affected long if/elif chains.
Bug Fix: Fixed bug that resulted in incorrect type evaluation of arguments to functools.partial call along with false positive errors. The problem is that the special-case logic for functools.partial was not applying bidirectional type inference when evaluating the arg type.
Behavior Change: Changed import modeling behavior for import statements with multi-part module names. The statement import a.b.c now implies import a; import a.b; import a.b.c. This also affects import cycle detection because these implicit imports are now part of the import graph.
Bug Fix: Fixed a bug that led to a false positive error when using a subclass of type as a base class in a class declaration.
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)
Bumps pyright from 1.1.293 to 1.1.298.
Release notes
Sourced from pyright's releases.
... (truncated)
Commits
574fc59
Published 1.1.298d016ff4
Published 1.1.2978c79c1b
Published 1.1.296e411e53
[PylanceBot] Pull Pylance with Pyright 1.1.295 (#4675)f5e43ca
Published 1.1.29558f6824
Published 1.1.294Dependabot 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)