github microsoft/pyright 1.1.371
Published 1.1.371

latest releases: 1.1.388, 1.1.387, 1.1.386...
4 months ago

Bug Fixes:

  • Fixed regression that results in a false positive when a traditional type alias (not using PEP 695 syntax) defines a union and is then used as a second argument to an isinstance or issubclass call.
  • Fixed bug that results in a false positive error when an unpack operator is used in an unparenthesized tuple expression on the RHS of an augmented assignment operator on Python 3.9 and newer.
  • Fixed bug that results in a false positive error when using a TypeVar with an upper bound of type as a base class in a class statement.
  • Fixed bug that results in false negative when a list or set expression includes more than 64 elements and is being evaluated with a bidirectional inference context.
  • Fixed type evaluation of old-style (pre-PEP 695) type alias that aliases a generic class when it is used as a direct constructor call.
  • Fixed bug that causes a false positive error when an __init_subclass__ has overloads.
  • Bumped minimum engine version from 1.86 to 1.89 to match the recently-updated language client library requirements.

Behavior Changes:

  • Changed the hard-coded type of the __class__ symbol to be Self@T rather than T (where T is the enclosing class).

Enhancements:

  • Added experimental support for multithreaded type checking in CLI. You can now specify --threads followed by an optional thread count. If no count is specified, pyright will use a value equal to the number of logical processors. Experimentation shows that this can speed up type checking by 2x to 3x for larger code bases. It has little or no effect (and possibly negative effects) for small code bases.
  • Improved detection of the use of variables used in type annotations.
  • Improved type narrowing in the fall-through case for sequence patterns when the pattern includes a star pattern and the subject type is a tuple with an indeterminate entry.
  • Improved handling of tuple expressions used in type expressions that involve specialization, such as dict[()].
  • Updated typeshed stubs to the latest version.
  • (From pylance) Improved security of python interpreter execution when determining the default python import resolution paths and python version.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.