Enhancements:
- Implemented provisional support for PEP 728 (support for extra items within TypedDicts). You must set enableExperimentalFeatures to true for now.
- Added support for concatenated strings used in a
@deprecated
decorator. - Added support for call-site return type inference for class and instance methods.
- Improved handling of
enum.nonmember
in cases where the attribute has a declared type. - Added missing check for inappropriate use of
InitVar
outside of a dataclass.
Behavior Changes:
- Added special-case handling for 'typing_extensions' module whose stubs are part of typeshed's stdlib stubs even though it is not part of stdlib.
- Refined the heuristic for when to use bidirectional type inference for the RHS of
and
andor
operators. - Changed behavior of command-line "--pythonversion" and "--pythonplatform" options so they now override the same-named options in the config file.
Bug Fixes:
- Fixed a bug that resulted in a false negative when attempting to use
TypedDict
orProtocol
as an upper bound when using PEP 695 syntax. - Fixed a bug that resulted in "reportUnnecessaryTypeIgnoreComment" diagnostics to be generated even if the source file was in the "ignore" list.
- Fixed a bug that leads to incorrect type inference for a lambda when passed to a constructor in certain circumstances.
- Fixed a bug that leads to a false positive type violation when reassigning a value within a loop and the target variable has a declared type of a constrained type variable.
- Fixed a bug that results in a false negative when passing an unpacked dict of the wrong type to a function that contains a positional-only parameter marker plus one or more keyword parameters.
- Fixed a bug in the import resolver that resulted in an incorrect resolution when an import within a
__init__.py
file uses the formfrom .a import a
. - Fixed a bug that results in a false positive error when an
await
expression is passed as an argument to an overloaded function. - Fixed a bug that results in an incorrect "Unbound" type evaluation for a variable assigned within a loop.