Bug Fix: Fixed a bug in the diagnostic filtering logic that caused the grayed-out "unused symbol" treatment to be suppressed when using a # pyright: ignore
comment. This comment is intended to apply only to real diagnostics (errors, warnings, infos), not hints with tags.
Bug Fix: Fixed a bug that resulted in incorrect type evaluation when accessing an attribute on a class whose metaclass defines a __getattr__
method and the target attribute is a descriptor object.
Bug Fix: Fixed a crash that can occur if a type annotation includes too many type arguments for a class.
Bug Fix: Fixed a regression that resulted in a false positive error when using float
or complex
literals or constructor calls and then accessing a member of the resulting object that is valid on that class but not on int
.
Bug Fix: Fixed a recent regression in the overload matching behavior that broke two tests in the pandas-stubs test suite.
Bug Fix: Fixed a bug that resulted in a false positive in certain circumstances where a lambda included simple math operations with integer literals. The fix requires disabling literal math within lambdas, since they are often used as callbacks that are called repeatedly in a loop.
Bug Fix: Reverted a portion of the recent changes designed to differentiate between a float
that is really a float
or a float
that can also be an int
. This resulted in false positives when inferring types using float literals.
Bug Fix: Fixed a false positive due to incorrect type narrowing logic when a del
statement targets a specific element within a list (e.g. del my_list[1]
).
Bug Fix: Fixed a crash due to an invalid assert that occurs when a class or function that uses PEP 695 syntax is unreachable.
Bug Fix: Fixed a bug that led to incorrect type evaluation and false positives when constructing a specialized generic TypedDict.
Enhancement: Updated typeshed stubs to the latest version.
Enhancement: Improved the check for whether an object is "awaitable". Rather than hard-coding checks for __await__
and __init__
methods, use the typing.Awaitable
protocol.
Bug Fix: Fixed a false positive reportInvalidStringEscapeSequence
error if a string literal is over 32K in length and the 32768'th character is a backslash.
Enhancement: Added support for PEP 692 (unpacked TypedDict for **kwargs
) when used with a ParamSpec
.
Bug Fix: Fixed a bug that led to the loss of type narrowing for a captured variable used within an inner scope if used in a comprehension expression.
Behavior Change: Changed the default Python version (the version that is assumed by pyright if it has no other context) from 3.11 to 3.12 now that 3.12 is final.
Enhancement: Improved diagnostic for the situation where overload matching fails to find any applicable overloads.
Bug Fix: Fixed a bug that resulted in incorrect type evaluation when an async function with an inferred return type is decorated with a class or function that uses a ParamSpec (such as functools.wraps
).
Bug Fix: Fixed a bug that led to a false positive error when using a single-quote form of a format string that uses a format specifier expression. This is also a bug in the Python 3.12 interpreter that is being fixed.