Bug Fixes:
- Fixed bug that results in a false positive "no overload implementation" error if an overloaded function is passed through a decorator that uses a ParamSpec.
- Fixed a recent regression that results in a false positive error when an
Enum
subclass overrides__new__
or__init__
and then a subclass of that class assigns tuple values when defining enum members - Fixed a bug that results in a false positive error when a method defined within a named tuple is overridden by a subclass
- Fixed a bug that results in a false positive error when a
enum.nonmember
value is assigned to a class-scoped variable with a type annotation in an Enum class. - Fixed a bug in the type narrowing logic for class pattern matching that resulted in incorrect narrowing in the negative (fall-through) case.
- Added missing check for inappropriate use of an unpacked TypeVarTuple within a TypeAliasType type parameter list.
- Fixed a false positive
reportUnknownArgumentType
error when assigning an empty list or dict expression to an index expression subscripted with a slice. - Fixed bug that results in a false positive error when assigning a tuple value that includes an unpacked TypeVarTuple to another tuple that also includes an unpacked TypeVarTuple.
- Fixed bug that results in a false positive error when calling
update
on a TypedDict with zero defined entries. - Fixed a bug that results in a false positive with the
reportUnnecessaryCast
check if the second argument is a special form. - Fixed a bug that led to incorrect type evaluation for a call that targets a generic function that uses a default argument for one of the generic parameters.
Behavior Changes:
- Change the heuristic for determining whether a metaclass supports
__or__
. In the case where the metaclass derives from Any or Unknown, pyright now assumes that it doesn't override__or__
. - Changed behavior of CLI's
--watch
mode. Previously, it reported diagnostic deltas when it detected a change, but it is more useful if it reports all remaining diagnostics even for files that it didn't reanalyze due to a file change.
Enhancements:
- Updated typeshed stubs to the latest version.
- Added provisional support for draft PEP 742 (TypeIs).
- Added check for the use of an implicit position-only parameter (one that starts with a double underscore) that is located after a non-position-only parameter.