Renamed 'cls_init' variable, and fixed its typing annotation.
Note: cls_init is a 'FunctionType' when class has its own __init__ method, and 'WrapperDescriptorType' when it is the object.__init__ method.
@@ -1078,9 +1078,9 @@ class MetaAggregate(type, Generic[TAggregate]):
except KeyError:
pass
- self_init: WrapperDescriptorType = cls.__init__ # type: ignore
+ cls_init: Union[FunctionType, WrapperDescriptorType] = cls.__init__ # type: ignore
kwargs = _coerce_args_to_kwargs(
- self_init,
+ cls_init,
args,
kwargs,
expects_id=cls in _annotations_mention_id,
