github microsoft/pyright 1.1.392
Published 1.1.392

15 hours ago

Bug Fixes:

  • Fixed bug that results in incorrect evaluation when passing a callable with a "*args" parameter to a callable with a Concatenate and ParamSpec.
  • Fixed bug that results in the extraPaths configuration option within an execution extending rather than overriding the extraPaths provided in the top-level config.
  • Fixed bug in dictionary expression type inference that results in the incorrect type when a dictionary expansion is used and the resulting expansion type is unknown.
  • Improved handling of __getitem__, __setitem__ and __delitem__ magic method modeling to handle descriptor objects.
  • Eliminated type evaluation order dependency that results from return type inference that involves recursion.
  • Fixed bug that results in an incorrect "overlapping overload" error message in certain cases involving parameters annotated with Self.
  • Fixed bug that results in a spurious error when an assignment expression (walrus operator) is used as an argument to a constructor call when the constructor has both a __new__ and __init__ with differing bidirectional type inference contexts.
  • Fixed bug that results in a spurious "incompatible method override" error when two subclasses with an overloaded method are combined using multiple inheritance.
  • Fixed bug that results in an "incompatible method override" false negative when overriding a method that uses class-scoped type parameters with a method that uses method-scoped type parameters.

Behavior Changes:

  • Changed error messages to refer to lowercase list, dict and type rather than their deprecated uppercase counterparts now that Python 3.8 is EOL'ed.
  • Improved type narrowing for issubclass in the negative ("else") case when the subject type is type or Any.

Enhancements:

  • Added missing syntax error check for positional argument that follows an unpacked keyword argument in a call expression. Also added a check for an unpack operator used within the first argument of a cast call.
  • Changed code that computes unescaped literal string type to convert CRLF to LF within multi-line triple-quoted strings so the behavior is consistent with runtime.
  • Improved error reporting for "async with" statement. Added check that return result of __aexit__ is awaitable and improved error messages for the case where __enter__, etc. are present but have incorrect signatures.
  • Added support for bidirectional type inference for assignment statements that are assigning to an index expression that is subscripted by a slice.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.