Bug Fix: Fixed a bug that results in a false positive error in certain circumstances when a match statement is used within a loop.
Bug Fix: Fixed a bug that caused a hang when a function that accepted a Callable with a ParamSpec was fed to itself as an argument.
Enhancement: Improved formatting of function signatures in hover text.
Enhancement: Added heuristic to better handle the case where a symbol is imported from two different modules, one in a try block and another in an except block. This pattern can be found in a number of libraries.
Enhancement: Added filtering in hover provider for overloaded constructors. Filtering for other overloaded functions and methods was previously added, but constructors were overlooked.
Bug Fix: Fixed a bug that resulted in an infinite loop in some cases where list lists, sets or dicts were inferred loop construct.
Enhancement: Extended the reportUnnecessaryComparison check to also handle conditions of the form x is None and x is not None.
Enhancement: Updated typeshed stubs to the latest version.
Bug Fix: Fixed a bug that resulted in incorrect type narrowing for discriminated TypedDict types when the narrowed expression includes a member access subexpression.
Bug Fix: Fixed bug in command-line version of pyright that led to the inclusion of file names in the output diagnostic report in cases where diagnostics were completely suppressed for that file using the --level option.
Enhancement: Improved type narrowing for truthy tests that involve int, str or bytes values. In the negative case, we can assume that the type is Literal[0], Literal[''] or Literal[b''].
Bug Fix: Fixed bug that resulted in a false positive when trying to assign a value of type NoneType to type[object].
Bug Fix: Fixed a bug that led to a false negative when a backslash character was used within an expression segment of an f-string.
Behavior Change: Modified overload matching algorithm to more closely match that of mypy. In the case where one or more arguments evaluate to Any but those arguments map to parameters whose types are the same, the first overload is selected. Only in cases where an Any argument produces ambiguous results is an Unknown result produced.
Bug Fix: Fixed a bug in the handling of file specs (globs) used for the "include" configuration option. A directory wildcard pattern (**) was not handled correctly.
Behavior Change: Disabled type narrowing for expressions of the form " == X" and != X". These were never documented to work, and they were causing significant performance issues. Also reverted recent attempt to modify the code complexity algorithm, as this change is no longer necessary.
Performance: Addressed performance issue in code that includes loops and many interdependencies between variables with inferred types. The optimization involves the introduction of an incomplete type generation count that is updated when a the type cache is updated in a way that could affect previously-calculated incomplete types.
Bug Fix: Fixed a bug that led to a false positive error about an "unknown type" in certain cases when using an assignment expression (walrus operator) in a loop.
Published 1.1.291
Bug Fix (from Pylance): Allow non-identifier characters immediately after #region.
Bug Fix: Fixed a bug that led to a crash in certain circumstances where a TypedDict field annotation contained a circular reference to the TypedDict.
Bug Fix: Fixed a bug that led to a crash under certain circumstances when a dictionary expansion subexpression (**val) was used.
Bug Fix: Fixed a bug that resulted in incorrect type evaluation for a symbols within a py.typed module that is contained with a non-py.typed namespace package.
Bug Fix: Fixed inconsistency within isinstance type guard logic when handling the narrowing of a type that contains a union with Any or Unknown.
Bug Fix: Fixed a bug that resulted in a false positive error when generic class with an invariant type parameter is used in specialized form as a type argument for a class with a contravariant type parameter.
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.271 to 1.1.292.
Release notes
Sourced from pyright's releases.
... (truncated)
Commits
e4e08c3
Published 1.1.292624feda
Published 1.1.291c6e79ef
Published 1.1.2909a0820d
Published 1.1.289bc4381e
Published 1.1.288b78a9e4
Push pylance changes to pyright (#4404)440d54d
Published 1.1.287b8505d8
Bump json5 from 2.2.1 to 2.2.3 (#4392)e4472b3
Published 1.1.2865c0de8b
Published 1.1.285Dependabot 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)