Bug Fixes:
- Fixed bug that results in a crash under certain circumstances when a ParamSpec without a scope is used illegally to specialize a class.
- Fixed a bug that results in a false positive error when assigning a
TypeGuard[T]
orTypeIs[T]
to a supertype ofbool
(likeint
). - Fixed a bug that leads to a crash when
--pythonversion
and--threads
CLI options are used together. - Fixed a bug that leads to incorrect type evaluation in certain specific conditions involving a function decorator with an return type inferred from an inner function parameterized by a ParamSpec.
- Fixed bug that results in a false positive error under very specific conditions involving a recursive type alias that is defined in terms of another type alias.
Enhancements:
- Changed type checking logic to retain a reference to default expressions in function signatures, including synthesized signatures (such as
__init__
methods in dataclasses). This allows the original default value expression to be printed in error messages and language server strings. - Updated typeshed stubs to the latest version.
- Added unreachable code reporting for case statements that are never matched based on type analysis.