github microsoft/pyright 1.1.59
Published 1.1.59

latest releases: 1.1.370, 1.1.369, 1.1.368...
3 years ago

Bug Fix: Changed the inferred type of an async function to use Coroutine rather than Awaitable type. Coroutine is a subclass of Awaitable and is arguably more correct in this case.

Bug Fix: Fixed a bug in the handling of position-only parameters with default values followed by named parameters or **kwargs.

Bug Fix: Fixed a bug where "yield from" argument was assumed to be an "Iterator", but it should really be an "Iterable".

Bug Fix: Fixed bug where "from .A import A" statement caused symbol "A" to have an inferred type that was a union of a module and other type, even though the other type immediately overwrites the module.

Behavior Change: Changed type stub generator to never generate parameter type annotations based purely on default value types since those can be incorrect or incomplete. Changed type stub generator to automatically add method return types for common magic methods whose return type is always the same.

Behavior Change: Changed type stub generator to avoid emitting functions and methods that begin with an underscore.

Enhancement: Changed type checker to flag unaccessed symbols within type stubs in some cases. It doesn't mark function parameters or variables as unaccessed, and it doesn't mark imports of the form "from x import y as z" or "import a as b" as unaccessed since those are intended to be re-exports.

Enhancement: Changed type checker to treat "..." as an "Unknown" type when used as the RHS of an assignment statement such as "a = ...". This idiom appears sometimes within type stubs, and it should be treated as a missing (unknown) type so stub authors know that they need to fill in a type annotation.

Enhancement: Improved the diagnostic message used to report parameter type mismatches when a parameter name isn't known.

Bug Fix: Fixed a bug whereby a TypeVar in a source type could be conflated with a same-named TypeVar in a dest type when performing TypeVar matching.

Bug Fix: On the Windows platform, avoid calling 'python3' to determine the import paths for the current interpreter. This command can sometimes display a dialog indicating that python isn't installed and can be downloaded from the store.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.