github microsoft/pyright 1.1.109
Published 1.1.109

latest releases: 1.1.360, 1.1.359, 1.1.358...
3 years ago

Enhancement: Added some performance optimizations to handle cases where there are many overloads for a function (>100). Previous code hit n^2 analysis times where n is number of overloads.

Enhancement: Added perf optimization that avoids reallocation of special form classes (like Protocol and Literal) every time they're used. Since instance of the type is now cached and reused.

Enhancement (from Pylance): Improved formatting of docstrings in hover text, completion suggestions, and signature help.

Enhancement (from Pylance): Added better performance metrics.

Bug Fix (from Pylance): Improved logic to ignore temp files created by code formatters like black.

Bug Fix: Fixed "possibly unbound" false positive error in try/except/else/finally statement in the special case where a "bare except" clause is used.

Bug Fix: Replaced logic that detects whether a function's inferred type is "NoReturn" — and specifically whether its implementation is a "raise NotImplementedError". The old logic depended results that varied depending on the order in which types were evaluated and was therefore nondeterministic.

Bug Fix: Fixed false negative where type expressions used as arguments to TypedDict or NamedTuple constructors are not correctly checked for incompatibility with older versions of Python when they contain | or use PEP 585 types.

Behavior Change: Changed PEP 585 violations (e.g. using list[int] rather than List[int]) to be unconditional errors rather than diagnostics controlled by reportGeneralTypeIssues diagnostic rule. That way, they appear even when type checking is disabled.

Bug Fix: Reverted recent change in for/else statement logic because it introduced a regression.

Behavior Change: Changed the reportUnboundVariable default severity from "warning" to "none" when typeCheckingMode is "off". There were too many complaints of false positives from users who have no interest in type checking.

Enhancement: When a redundant form of a from .. import statement is used (e.g. from x import foo as foo), always mark the imported symbol as accessed because it is assumed that it is being re-exported.

Bug Fix: Fixed bug that caused incorrect type evaluation when a return type in a generic function used a Callable with Concatenate and a ParamSpec.

Bug Fix: Fixed bug in code that prints types (e.g. in error messages and hover text) that resulted in duplicate types in a union when typeCheckingMode was "off".

Enhancement: Updated code that prints function types (e.g. for error messages and hover text) to include unioned return types in parentheses to distinguish between () -> (int | str) and () -> int | str.

Bug Fix: Fixed formatting of usage text in CLI. Fix contributed by @fannheyward.

Bug Fix: Fixed bug that caused problems when the type ellipsis was used in a type stub instead of ....

Bug Fix: Fixed recent regression in handling of isinstance second parameter.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.