npm pyright 1.1.240
Published 1.1.240

latest releases: 1.1.369, 1.1.368, 1.1.367...
2 years ago

Enhancement: Enhanced reportIncompatibleMethodOverride check to detect cases where a staticmethod, classmethod or instance method override a method that doesn't match in that regard.

Bug Fix: Added check for complex code blocks (that contain hundreds of if/elif statements within loops). These now emit an error rather than resulting in tens of seconds of compute.

Bug Fix: Fixed bug that resulted in combinatoric explosion within a union when using literals in an augmented assignment. This led to crashes in extreme cases.

Bug Fix: Added limit to the number of recursive function return type inference operations that can be pending concurrently. Theoretically, this could be arbitrarily deep, which will eventually overflow the call stack and crash. Such a crash is showing up in the pylance telemetry. We now limit it to 16 levels deep to prevent this crash.

Bug Fix: Fixed a bug that resulted in the incorrect type evaluation for a member expression when the LHS type was a Type[T] type.

Bug Fix: Fixed bug that caused a crash when the setter for a descriptor class had only two parameters and was used in a class variable for another class.

Performance: Implemented small perf improvements to core union functions, which are hot paths in the type analyzer.

Bug Fix: Fixed a bug that resulted in false negative errors during protocol matching when a method within the protocol contained a keyword-only parameter annotated with a class-scoped TypeVar.

Bug Fix: Fixed bug in type evaluator that resulted in an errant Unknown type when evaluating a dependent variable assigned through a tuple within a loop.

Bug Fix: Fixed bug in code flow engine that results in infinite recursion and a stack overflow under certain circumstances.

Bug Fix: Fixed bug that resulted in inconsistent behavior when a TypeVar was used as the value for a magic method and was explicitly or implicitly set to Any or Unknown.

Bug Fix: Fixed a false positive error related to __slots__ usage within a dataclass.

Bug Fix: Fixed bug in static expression evaluator that resulted in incorrect evaluation when using the not unary operator.

Bug Fix: Improved type evaluation for expressions that are determined to be unreachable. Such code should evaluate to the type Never and never generate errors or warnings.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.