Fixed bug that can result in incorrect type evaluation behaviors if a call to type is used within a loop.
Fixed bug that results in incorrect type inference for list, set, dict, and tuple expressions that include modules in them.
Fixed bug that results in false positive error when using a Final variable in a protocol and a NamedTuple or frozen dataclass as a concrete class.
Fixed bug that results in a false negative when assigning a value to a union type that includes the same type variable multiple times in at least one invariant context. This change eliminates the concept of a "locked" constraint tracker, which is no longer needed and was the underlying cause of the bug.
Fixed bug that resulted in a "reportIncompatibleMethodOverride" error being reported in the wrong location when a property method has a decorator applied to it.
Fixed a bug that results in a false positive when assigning Never to a type variable in a contravariant context.
Added check for the illegal use of TypeForm as the second argument to an isinstance or issubclass call.
Fixed bug that results in incorrect type narrowing when a value typed as TypeForm is used as the first argument to isinstance.
Fixed a bug that can result in a false positive error when a function signature contains a positional-only parameter and a keyword parameter with the same name. This can result from the application of a ParamSpec or through the use of an unpacked TypedDict.
Fixed a bug that results in incorrect type evaluation behaviors when a class has a custom metaclass with a __call__ method and a __new__ or __init__ method that provides a different bidirectional type inference context for parameters.
Enhancements:
Added special-case handling for the len(t) == L type guard pattern to handle the negative narrowing case where tuple t has a minimum length of L. In this case, the narrowed type can be computed whereas previously it was left unnarrowed.
Improved hover text for converters in dataclass-like classes.
Updated typeshed stubs to the latest version.
Extended reportUnnecessaryComparison to cover more cases involving is and is not operators.
Published 1.1.381
Bug Fixes:
Fixed bug that results in incorrect type narrowing for sequence patterns in the negative (fall-through) case when the subject is a tuple with an unbounded entry.
Fixed recent regression that results in a false positive error when attempting to assign the expression type(Any) to type type[Any].
Fixed a bug that results in incorrect evaluation of a variable in a doubly-nested loop that is assigned a value in an assignment expression.
Fixed a bug that results in incorrect narrowing of types for TypeIs user-defined type guard in certain cases when variable type is a union.
[Contribution by @dcolascione] Fixed bug that results in a condition where imports stop resolving after file edits that change the set of modules that a file imports.
Fixed recent regression that results in incorrect type narrowing for isinstance in the negative case when using type as a filter.
Fixed bug that results in incorrect reporting of the Python version in a deprecation diagnostic message.
Fixed bug that results in incorrect code flow involving a call to a NoReturn callable with a function decorator applied.
Fixed bug that results in a spurious "symbol refers to itself" error under very specific conditions.
Fixed bug that can theoretically result in spurious errors when evaluating expressions that involve parameter symbols.
Fixed bug that results in incorrect type narrowing when TypeIs intersects type[A] with type[B]. Previously, pyright was producing <subclass of type[A] and type[B]> but now produces type[<subclass of A and B>].
[From pylance] Fixed recent regression that caused venvPath specified in language server settings to be ignored.
Fixed bug that results in a confusing error message extension referencing a missing __set__ method when assigning to a class variable that is not a descriptor object.
Fixed a bug that results in a false positive type error and confusing error message when assigning to a class variable that uses Self in its type definition.
Fixed a bug that results in spurious "variable not allowed in type expression" errors when a type alias is used in a loop in both a type expression and a value expression.
Behavior Changes:
Updated provisional support for TypeForm based on feedback to draft PEP 747.
Enhancements:
Expanded reportUnnecessaryIsinstance check to report cases where an isinstance or issubclass call always evaluates to False.
Improved error message for type violation in assignment statement where the LHS is an instance variable reference.
[From pylance] Update Unicode range tables to match Unicode 16.0, which is used for Python 3.14.
Published 1.1.380
Bug Fixes:
Fixed a recent regression that results in incorrect type evaluation when using a two-argument form of super() and the second argument is type[Self].
Fixed a recent regression that results in a false positive type error when converting certain constructors (such as for the class defaultdict) to a callable type.
Fixed recent regression that results in a false positive under certain specific circumstances involving higher-order functions that return generic callable types.
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)
Bumps pyright from 1.1.378 to 1.1.382.
Release notes
Sourced from pyright's releases.
... (truncated)
Commits
a209885
Published 1.1.382a56a4ec
Published 1.1.381d91a24b
Published 1.1.3808312965
Published 1.1.3792fa3638
Bump webpack from 5.90.1 to 5.94.0 in /packages/pyright (#8845)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