The implementation of ifex_ast_construction.py adds init() functions to dataclasses and those init functions also do some checks of the input parameters to ensure they are using the right data type.
Since @dataclass is such a fundamental concept in python, (and combined with the typing library, as it is here) I imagine this kind of type-validation might already be implemented in some 3rd-party library, or maybe even supported somehow by Python itself.
If anyone is aware, this is a ticket to see if there is already an existing / better implementation of it because I expect that there is!
In that case, we can simplify things by removing the custom implementation, and improving quality.