npm pyright 1.1.323
Published 1.1.323

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

Bug Fix: Fixed a condition in the code flow engine that corrupted internal state and led to a crash.

Bug Fix: Fixed bug that resulted in incorrect type evaluation for an async function that has no type annotations. It was using call-site return type inference but failing to wrap the result in a Coroutine.

Enhancement (from Pylance): Added support for ".jar" files for import targets.

Bug Fix: Fixed bug that led to false negative when assignment expression (walrus operator) is used in a yield or yield from statement without a parenthesis.

Bug Fix: Fixed a bug that resulted in incorrect type evaluation (and a false positive error) when a binary operator overload method was annotated to return NoReturn.

Enhancement: Updated typeshed to the latest. This update includes some changes to the two-parameter form of the get method for dict and TypedDict that may result in visible type evaluation changes in some code bases.

Enhancement: Added a check for hashability for objects used as dict keys. Contribution from @TheTripleV.

Bug Fix: Fixed a bug that resulted in a false positive reportUnnecessaryComparison error when the subject of a match statement was mutated in a loop.

Enhancement: Added special-case handling of enum fields that are callables, which are apparently not treated as enumerated types.

Enhancement: Added check to enforce a generator's "send type" in a yield from statement.

Enhancement: Added special-case logic for fields with the name __hash__ within a dataclass.

Enhancement: Added support for ... in the last type argument of Concatenate. After much discussion (see python/cpython#30969), it has been decided to support this even though a strict reading of PEP 612 seems to exclude it.

Bug Fix: Fixed a bug that led to a false negative when assigning a dictionary literal expression to a TypeVar bound to a TypedDict.

Bug Fix: Fixed a bug that led to a false negative when a TypeVar was used inappropriately in certain cases.

Bug Fix: Fixed bug in protocol matching that led to an incorrect protocol match with a NamedTuple. Fields in a NamedTuple are implicitly read-only, so a writable protocol should not match.

Enhancement: Added type compatibility enforcement for symbols imported via a wildcard import.

Enhancement: Added support for indexing into tuples of indeterminate length as long as the index is positive and falls within a determinate portion.

Bug Fix: Fixed type narrowing bug that affected the A is B type narrowing pattern when A has the type type.

Bug Fix: Fixed false positive where an inner function within a method uses a TypeVar to annotate its parameter. The variance of the TypeVar shouldn't be checked in this case, whereas it should be for the method.

Bug Fix: Fixed a bug that led to a false positive when accessing a cached_property defined on an enum.

Bug Fix: Fixed a bug in import resolver that caused a site-packages module to be preferred over a local module if the site-packages package is "py.typed".

Bug Fix: Fixed bug that led to a false positive when a two-argument form of a super call used type as the first argument.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.