Published 1.1.369
Behavior Changes:
- Improved consistency of unreachable code. Previously, unreachable code was not supported for
if
orelse
suites when the condition type was narrowed toNever
. - 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 toNamedTuple
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 requiresint
. - 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.