Fixed bug that results in a false negative syntax error when a PEP-695 type alias uses a keyword as a name.
Fixed a bug that leads to a false positive error when first argument to super call is an instance of a metaclass.
Fixed recent regression that results in a false positive when accessing an enum member from an instance of an enum class.
Fixed bug that results in a false negative when determining if a callable type is compatible with another callable type and the first has a *args parameter and the second has a single positional+keyword parameter.
Fixed a bug in the code flow engine that results in incorrect type evaluation in certain cases involving codependent variables in a loop.
Fixed a bug that results in incorrect type narrowing for a type guard function that uses TypeIs[type[T]].
Fixed regression related to "converter" field parameter for dataclasses when the converter refers to a generic class constructor.
Fixed a bug that results in a false negative when a generic function has a parameter with a generic type and a default argument value. This could lead to a typing hole when considering subtyping rules for callables.
Fixed a bug in the dataclass "converter" support that resulted in an error if the converter is tuple.
Fixed regression that results in incorrect type evaluation for annotations that involve nested protocols (such as P[P[T]]).
Fixed a bug that resulted in an infinite loop when a function that uses an *args: *Ts parameter is passed as an argument to itself.
Fixed bug that leads to a false negative when calling a callback function that returns a callable with a generic parameter type.
Behavior Changes:
Changed the handling of Enum subclasses that explicitly override value or name to avoid using the special-case logic for computing these types. This is done regardless of whether the class uses a custom metaclass.
Changed support for dataclass "converter" field parameter to be off by default. The "enableExperimentalFeatures" must now be enabled to use this feature. If and when PEP 712 is approved, it will be moved out of experimental.
Added support for using Literal and various other special forms in a value expression.
Enhancements:
Added support for recent addendum to typing spec that provides a special case for dataclasses so ClassVar and Final can be used together to distinguish between a regular Final instance variable and a ClassVar that is also Final.
Updated typeshed stubs to the latest version.
Improved type printer (the component that converts an internal type to textual format for diagnostic messages) so it better handles special forms like Literal or unions when used in a value expression.
Published 1.1.363
Bug Fixes:
Updated manifest to reflect the correct default value for reportInvalidTypeForm.
Fixed bug that resulted in diagnostics associated with the reportUnnecessaryTypeIgnoreComment check to not include the error code.
Fixed bug that causes a false positive reportPrivateUsage error when a global or nonlocal binding is used within a class to access an outer-scoped variable.
Fixed bug that results in a false positive reportUnnecessaryComparison when a variable is used in a conditional expression and its type is a union that includes a Coroutine and a non-coroutine.
Fixed false positive deprecatedTypingAliases deprecation for collections.abc.AbstractSet due to a recent change in typeshed stubs.
Fixed recent regression that results in assert_type failure when a class is parameterized by a ParamSpec with a default value.
Improved handling of constrained TypeVars when used with unary operators.
Fixed bug that results in incorrect type narrowing for a tuple with determinate length when indexed with an out-of-bounds slice.
Fixed bug that results in incorrect type narrowing for isinstance or issubclass type guard when the filter is a generic class whose type parameter has a default value.
Fixed bug that results in incorrect type evaluation behavior within class body of an enum class when one enum member is used to define another enum member. This involved a significant rewrite of the logic involving enum symbol evaluation.
Fixed a bug that results in a false positive error when a decorator is applied to a property.
Fixed bug that resulted in false positive when evaluating a function call involving a TypeVarTuple under certain circumstances.
Fixed a bug that results in incorrect type evaluation when a function parameterized with a TypeVarTuple is passed as an argument to another function parameterized with a TypeVarTuple.
Behavior Changes:
Deferred execution of type annotations (PEP 649) did not make it into Python 3.13 and has been deferred (again) until Python 3.14. Changing pyright's logic accordingly.
Changed the type evaluation for type(Any) or type(x) where x is a value of type Any or Unknown. These now evaluate to type[Unknown].
Changed the TypeVar scoping behavior for TypeVars that appear only within a Callable subtype within a function's declared return type. Previously, pyright scoped these TypeVars to the Callable rather than the function. This was due to issue #4285. I'm reversing this decision because it's not spec-compliant, creates a bunch of unnecessary complexity, and results in buggy behavior.
Published 1.1.362
Bug Fixes:
Fixed a bug that results in incorrect type narrowing when a match statement uses an empty (zero-element) sequence pattern and the subject expression type is a tuple that potentially (but does not always) have a zero length.
Fixed a crashing bug that results from an internal assertion failure when a generic class that uses PEP 695 syntax is located within an unreachable code block.
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.333 to 1.1.364.
Release notes
Sourced from pyright's releases.
... (truncated)
Commits
a18387f
Published 1.1.3647ccf956
Published 1.1.3633af2bbc
Published 1.1.362ab84d41
Published 1.1.361f4afe40
Published 1.1.360cc3467f
Published 1.1.359989ee29
Published 1.1.3588752be7
Published 1.1.3574106a09
Share heap usage numbers to support cache cleanup in VS code (#7605)9f02004
Published 1.1.356Dependabot 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