github microsoft/pyright 1.1.217
Published 1.1.217

latest releases: 1.1.382, 1.1.381, 1.1.380...
2 years ago

Bug Fix: Fixed a bug that resulted in a false positive error when passing an *args argument typed as an unpacked TypeVarTuple to a function that includes an unpacked TypeVarTuple parameter.

Enhancement: Added special-case bidirectional type inference for the right operand of the "|" and "|=" operators (with an expected type based on the left operand). This supports the case where the left operand is a TypedDict and the right operand is a dict expression that conforms to the TypedDict type.

Bug Fix: Fixed a bug in the reportIncompatibleMethodOverride check that resulted in false positive errors when both the base class and child methods have overloads but the base class does not have an implementation and the child class does.

Enhancement: Updated typeshed stubs to the latest version.

Bug Fix: Fixed a bug that results in false positive errors when a ClassVar type declaration appears within an Annotated.

Bug Fix: Added special-case handling of Generic base types to match the (undocumented) runtime behavior. Without this special-case handling, pyright reports that "a consistent method ordering cannot be found" in some cases where the runtime does not.

Bug Fix: Fixed bug that is leading to some crashes that appear in the telemetry.

Bug Fix: Added recursion detection for wildcard import lookups during code flow.

Bug Fix: Fixed a bug that caused a type alias of Any to be evaluated as Unknown if defined within a py.typed library.

Performance: Improved performance when analyzing types that involve some forms of recursive type aliases.

Enhancement: Added support for typing_extensions.Never and typing.Never type and unified the underlying handling of Never and NoReturn, which are synonyms.

Enhancement: Improved type stub generation code to emit definitions for TypeVar, TypeVarTuple, ParamSpec and NewType.

Behavior Change: Changed heuristics for matching two union types when the destination union includes a combination of concrete types and one or more type variables. This case involves some heuristics in the constraint solver because multiple solutions are possible.

Bug Fix: Fixed a bug that resulted in a false positive when assigning to a field in a dataclass that is annotated with a Callable type.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.