biqqles / dataclassy

A fast and flexible reimplementation of data classes
https://pypi.org/project/dataclassy
Mozilla Public License 2.0
81 stars 9 forks source link

add test for recursive inheritance with __post_init__ #29

Closed hroskes closed 3 years ago

hroskes commented 3 years ago

it doesn't work :(

The issue is that this line isn't recursive. This would work on my MRO PR #28 but I can come up with another solution if you'd prefer not to go there.

biqqles commented 3 years ago

Sorry, I don't understand. What is recursive about this scenario?

biqqles commented 3 years ago

OK, I think I understand the issue now. If the method was defined more than one generation ago, it's only visible as a descriptor and so not detected. Oh dear, this was an awful regression!

biqqles commented 3 years ago

Merged the test and added a fix so it passes.