github microsoft/pyright 1.1.369
Published 1.1.369

latest releases: 1.1.382, 1.1.381, 1.1.380...
3 months ago

Behavior Changes:

  • 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.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.