Closed hroskes closed 3 years ago
Thanks for this nice PR! Unfortunately, DataClassInit
will shortly be removed when the changes discussed in #12 are merged, which will render this fix redundant. However the added tests might be useful in their own right. I will get back to you then.
Thank you! I'll go ahead and close this.
If there's not
__init__
function defined,__new__
ofDataClassMeta
uses the actualmcs
, which works well with subclasses becausemcs
is the actual subclass. However, if__init__
is defined,__new__
is hardcoded to useDataClassInit
. This PR fixes that and instead creates a subclass ofDataClassInit
for each subclass ofDataClassMeta
, as needed.