Improved consistency of unreachable code. Previously, unreachable code was not supported for if or else suites when the condition type was narrowed to Never.
Changed hover provider output for type aliases to conform more closely with the new Python 3.12 type syntax.
Enhancements:
Added support for detecting mismatched property types in base classes used for multiple inheritance.
Improved reportUninitializedInstanceVariable check to handle dataclass variables that are initialized implicitly by the synthesized __init__ method.
Added support for walrus (assignment) operator within set literal expressions if the python version is >= 3.10. The grammar was changed in 3.10 to support this.
Bug Fixes:
Fixed recent regression in reportUninitializedInstanceVariable check relating to NamedTuple instance variables.
Fixed bug that leads to a false negative when a subscript object used in an index expression supports __index__ but the indexed object specifies that it requires int.
Fixed recent regression that results in a runtime assert (and therefore a crash) in certain circumstances when computing the MRO for a class.
Fixed bug that results in an incorrect overload implementation diagnostic when using tuple[()] in overloads.
Improved diagnostic messages for type errors detected during __set__ and __delete__ calls to a descriptor object.
Fixed bug that results in a false positive error when using a callback protocol with a function-scoped type variable.
Fixed bug that incorrectly evaluates a constructor call to a constructor that infers a class-scoped ParamSpec when the passed function is generic.
Fixed bug that leads to a spurious "unbound variable" diagnostic when a variable is assigned a value using a walrus operator and is later used in a ** call argument.
Fixed bug that results in incorrect type narrowing in the negative (fall-through) case of a match expression when the subject expression is an unbounded tuple.
Published 1.1.368
Bug Fixes:
Fixed a bug that causes warnings.deprecated not to work if the python version is 3.13. This was caused by recent changes to typeshed stubs.
Fixed bug that results in inconsistent diagnostics when surrounding an argument expression with parentheses.
Fixed bug that causes a "bare" type (with no type argument) or type[Any] to be treated as a possible descriptor object.
Fixed regression that results in an internal assertion (and crash) related to TypeVar variance inference.
Fixed a bug in the "type printer" (the component responsible for translating a type into its textual form) for type aliases defined using PEP 695 syntax.
Fixed bug that resulted in the incorrect synthesis of __dataclass_fields__ for named tuples.
(Contributed by @InSync) Fixed stubPath's default value in configuration schema.
Fixed bug in pattern matching for Callable() in the negative (fall-through) case.
Fixed bug that results in unions consisting of different specialized forms of a generic TypedDict to "lose" all but one of these subtypes.
Behavior Changes:
Changed inference behavior for generator functions with no reachable yield or yield from statements. The "yield type" (the first type argument to Generator) is now inferred as Never in this case rather than None.
Changed the behavior of double underscored symbols that are part of a module's namespace when that module is not a stub or in a "py.typed" package. Such symbols are no longer ignored, although they are considered private.
Changed the way that PEP 695 type aliases are displayed when hovering over a reference to the type alias. Previously, the symbol was displayed as TypeAliasType rather than the expanded type alias type.
Enhancements:
Added support for deprecated objects that are instantiated prior to being used as a decorator. This allows for a factory usage pattern.
Added check for illegal use of Protocol type argument that is not a type parameter. The runtime generates an exception for this condition.
Published 1.1.367
Bug Fixes:
Fixed bug that results in incorrect truthy/falsy type narrowing for an enum that overrides __bool__.
Fixed bug that results in a false positive when accessing a generic attribute in a base class from a subclass that explicitly specializes the generic type.
Fixed bug that results in duplicate and (contradictory) diagnostic outputs in certain cases where reveal_type is used in a loop.
Fixed a bug that results in incorrect (local) type evaluation of an instance variable with a declared type when assigned within a loop that uses an augmented assignment.
Fixed bug that causes Final annotation not to be honored when wrapped in an Annotated annotation.
Fixed bug that results in a false positive error under certain circumstances involving tuple type narrowing in a loop.
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.366 to 1.1.369.
Release notes
Sourced from pyright's releases.
... (truncated)
Commits
a5cbd47
Published 1.1.3691bf99d3
Published 1.1.368beb1f15
Bump braces from 3.0.2 to 3.0.3 in /packages/pyright (#8122)597c634
Published 1.1.367Dependabot 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