ProtixIT / dataclass-binder

Python library to bind TOML data to dataclasses in a type-safe way
MIT License
13 stars 2 forks source link

Generate template in depth-first order and fix recursive dataclasses #28

Closed mthuurne closed 1 year ago

mthuurne commented 1 year ago

A depth-first template is more usable, as it keeps related items together.

While writing a unit test to check the template order, I found out that recursive dataclasses would lead to infinite recursion in both the binder creation and template formatting. Both have been fixed now.