npm pyright 1.1.399
Published 1.1.399

latest release: 1.1.400
26 days ago

Bug Fixes:

  • Fixed bug that results in incorrect type narrowing when a value whose type is a non-callable (and non-final) class is passed as the second argument to an isinstance call and the first argument is a callable type. In this case, a subclass could provide a compatible __call__ method, so the type shouldn't be narrowed to Never.
  • Fixed bug that results in a false positive "missing stub file" diagnostic when importing a "py.typed" submodule from a namespace package.
  • Fixed bug that results in a false negative when a type variable with an upper bound is used to annotate a parameter in a method override.
  • Fixed a bug that results in a false negative for a method override that uses Self in a contravariant position.
  • Fixed bug that results in a false positive error under certain circumstances involving a type variable with an upper bound of type[T] that is assigned to another type variable.
  • Fixed a bug that results in a false negative when the specialization of a TypeVarTuple includes multiple unpacked tuples of unknown length.
  • Fixed a bug that results in a false negative when a class that derives from type[Any] is assigned to any other type.
  • Fixed bug that results in an incorrect error under certain circumstances when inferring the return type of a recursive function that has a decorator or is async.
  • Fixed bug that results in a false negative when a return statement contains a call expression that invokes a NoReturn call and the argument list contains errors.
  • Fixed bug that leads to a false positive in the reportUnnecessaryComparison check when one operand's type is a callable and the other is not.
  • [From pylance] Fixed a bug that results in an internal assertion (and therefore a crash) when __builtins__.pyi imports from a project file.

Enhancements:

  • Extended deprecateTypingAliases feature to support symbols imported from typing_extensions.
  • Extended reportUnknownVariableType check to include cases where a value whose type is a generic class parameterized by Unknown is assigned to a variable with a declared type.
  • Extended the check for isinstance and issubclass argument validation to flag the Literal special form, which leads to a runtime error when used in the second argument.
  • Updated typeshed stubs to the latest version. This version removes support for Python 3.8, which is now out of service.

Behavior Changes:

  • Removed support for ru and ur string prefixes. These were supported in Python 2.7 but are syntax errors in Python 3.x.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.