github microsoft/pyright 1.1.383
Published 1.1.383

7 hours ago

Bug Fixes:

  • Fixed a bug that resulted in an incorrect error when using a # pyright: standard directive.
  • Fixed a bug that leads to incorrect type evaluation when "literal math" for unary operators are applied to a TypeVar value that has a literal value upper bound.
  • Fixed bug with the provisional TypeForm support that breaks aliases of Annotated.
  • Fixed bug that results in incorrect variance inference for some generic type aliases that use auto variance and nested callable types.
  • Fixed bug that resulted in a false negative when assigning a specialized recursive generic type alias to itself when variance of its type parameters are not covariant.
  • Fixed several bugs related to the explicit specialization of a generic type alias parameterized by a single ParamSpec. Concatenate was being handled incorrectly.
  • Fixed bug that results in a false negative when a type variable is defined with the expression .... This should be flagged as an illegal type expression.
  • Fixed bug that caused type alias to Never or NoReturn to lose its type alias association in some circumstances.

Enhancements:

  • Improved verbose logging of execution environment information.
  • Added code to propagate information about certain typing module imports from an implicitly-imported module (e.g. builtins or __builtins__.pyi) so Final and ClassVar can be treated as special forms by the binder. This fixes the use of these typing symbols in notebooks within pylance, which leverages implicitly-imported modules to "chain together" notebook cells.
  • Added check for use of a TypedDict class within a case statement class pattern. This condition generates a runtime error.
  • Improved type evaluation performance in certain cases involving protocol matching for complex, nested protocols.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.