github microsoft/pyright 1.1.247
Published 1.1.247

latest releases: 1.1.389, 1.1.388, 1.1.387...
2 years ago

Bug Fix: Fixed bug in symbol resolution when a symbol is associated with a class scope but not yet assigned a value. In this case, the runtime looks in the global (module) scope for the symbol rather than following the normal scope hierarchy.

Bug Fix: Fixed a bug that led to a false negative when calling a Callable callback with a generic parameter and passing a non-generic argument.

Bug Fix: Changed the behavior of the type evaluator for generic functions and constructors where a TypeVar is unsolved. Previously, the TypeVar was "leaked". Now it is transformed into an "Unknown" type.

Performance: Added small performance and memory optimization in binder that avoids some extra work related to member access expressions.

Performance: Added code to detect execution flows with long straight-line code flow graph segments. This is not captured in the cyclical code complexity calculations that we normally use to determine if code is too complex to analyze.

Enhancement: Improved handling of context managers that swallow exceptions. The type of the context manager is now evaluated using the full type analyzer. The previous technique used some special-case handling which covered about 95% of the cases but left some cases unhandled.

Enhancement: Updated typeshed stubs to the latest version.

Bug Fix: Adjusted heuristics for TypeVar constraint solver to better handle the case where a union is assigned to a union of TypeVars and the number of subtypes in these two unions is the same.

Bug Fix: Fixed a bug that resulted in a false negative when doing protocol matching with a generic class that calls its own constructor.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.