Bug Fixes:
- Fixed a bug that results in a false positive when a class is defined within a generic function and uses type parameters from that function.
- Fixed a bug that results in unexpected constraint solver results in certain cases involving arguments with lambda expressions.
- Fixed bug that results in false positive under certain circumstances involving classes parameterized with a contravariant type variable.
- Fixed bug that results in incorrect evaluation of class variables assigned in an
__init_subclass__
or__class_getitem__
method. These methods are implicitly class methods even though they are not decorated with@classmethod
. - Removed recent check for illegal identifiers used in
alias
fordataclass_transform
field. This isn't an illegal condition, so the resulting error was a false positive. Instead, changed completion provider to not suggest the illegal identifier as a valid keyword argument.
Enhancements:
- Enhanced the special-case logic for functools.partial so it handles the case where the function has a
**kwargs
parameter typed with an unpacked TypedDict. - Improved the synthesized type of the
keys
,values
anditems
methods on a closed TypedDict to provide a more precise (narrower) type for the key values. - Improved the handling of a TypeVar whose definition involves a circular definition.
- Added check for
__slots__
initialization when the__slots__
list is empty and the class is marked@final
.