github microsoft/pyright 1.1.389
Published 1.1.389

one day ago

Bug Fixes:

  • Fixed bug that results in a false negative if a | union operator creates a union of generic types. These types should be specialized with default type arguments.
  • Fixed bug that results in false negative when raising a value of type None.
  • Fixed bug that results in an incorrect type evaluation when a match statement uses a pattern with a target expression that overwrites the subject expression.
  • Fixed bug that results in a missing reportUnknownArgumentType error if the argument is an expression involving an __init__ parameter in an unannotated (pseudo-generic) class.
  • Fixed bugs that resulted in false positive errors when using an expression of the form type(A) as a base class or a metaclass in a class definition.
  • Fixed bug that leads to false positive when a method is overridden by a polymorphic method.
  • Fixed bug that affects pyproject.toml files with an emoji character by switching to a different toml parser.
  • Fixed a bug that results in a false negative when a class is used in a type annotation for a method parameter and both the class and the method are generic and use PEP 695 syntax.
  • Fixed a bug that results in a false positive "--verifytypes" error when using an explicit TypeAliasType call to create a public symbol in a "py.typed" library.
  • Fixed bug that results in the incorrect detection of an asymmetric descriptor if the descriptor class is generic.

Enhancements:

  • [From Pylance]: Improved signature help to skip keyword-only params with invalid names.
  • Added checks for except* clause to report invalid usage that is flagged as a syntax error at runtime.
  • Added check for the illegal use of an await keyword in a lambda.
  • Added missing checks for illegal use of await and async within list, set and dictionary comprehensions within a non-async function.
  • Improved a confusing error message that results when a class is assigned to an incompatible class.
  • Added narrowing support for a TypedDict value, which can be assumed never to be falsy if it has at least one required entry.
  • Improved the "x is y" and "type(x) is y" type guards to better handle the case where x is a TypeVar.
  • Updated typeshed stubs to the latest version.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.