npm pyright 1.1.320
Published 1.1.320

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

Bug Fix: Reverted new version of chalk library. The newer version is not compatible with node v12.

Bug Fix: Fixed a bug that resulted in a false positive error when attempting to assign a TypeVar T that has a bound of type to an expression type[S].

Enhancement: Added a new configuration options flag called enableExperimentalFeatures that controls whether certain experimental features are enabled. Currently there are three features under this flag: StrictTypeGuard, ReadOnly fields for typed dicts, and inlined TypedDict definitions.

Enhancement: Removed support for experimental StrictTypeGuard and replaced it with an experimental variant of TypeGuard that applies strict semantics if certain conditions are met.

Bug Fix: Fixed a bug that led to incorrect variance inference when a value annotated with a class-scoped TypeVar was assigned to an instance variable.

Behavior Change: Updated heuristics for how to handle custom metaclass __call__ methods based on feedback. Previously, if a metaclass __call__ method was present, pyright assumed that __new__ and __init__ may not be called, so it ignored them. The new heuristic assumes that if the metaclass __call__ returns a type that is consistent with the expected return type of type.__call__ that it is probably mirroring the behavior of type.__call__ and calling the class' __new__ and __init__ methods.

Behavior Change: Changed auto-variance algorithm to exempt class and instance variables that are named as protected or private.

Bug Fix: Fixed a regression that caused class decorators of generic classes to no longer be specializable.

Bug Fix: Fixed a bug that resulted in an apparent hang within the type printing logic. This was triggered by a pathological case involving a deeply recursive type.

Behavior Change: Modified type inference logic so methods that raise an exception whose type derives from NotImplementedError is not inferred to return NoReturn. Previously, only NotImplementedError was exempted, not subclasses.

Behavior Change: Removed old code that looks for a typeshed override in the standard python search paths. This works around an issue with the inject library, which installs a bogus typeshed directory into site-packages.

Bug Fix: Fixed a bug that results in unsolved type variables in a call return if the target function's return type is a callable that has type variables that are scoped to that callable.

Bug Fix: Fixed a bug that resulted in incorrect type evaluation when a generic function that returns a callable is passed itself as an argument and the resulting callable is then called and passed that same function as an argument.

Bug Fix: Fixed a bug in the command-line version of pyright where it did not enable "auto search paths", so it didn't automatically add "src" as an extra path.

Bug Fix: Fixed a bug that led to a false negative when determining whether two base classes that are combined using multiple inheritance implement the same method in an incompatible way. The bug caused the check to be skipped if the child class also implemented the same method as the two base classes.

Bug Fix: Fixed a bug that resulted in a false positive error when using an unpack operator within a call to an overloaded function.

Bug Fix: Fixed a bug that resulted in a false positive error when a captured variable within an inner scope (function or lambda) is imported from another module using an import statement that comes after the function or lambda.

Bug Fix: Fixed bug that led to incorrect type evaluation when accessing the name attribute on an enum.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.