Skip to content

0.14.0 - helpers, bugfix, and ancestor-first option in init makers

Choose a tag to compare

@smarie smarie released this 15 Nov 10:37
· 134 commits to main since this release

API

  • new helper methods get_field, yield_fields, has_fields and get_fields (new name of collect_all_fields) so that other libraries such as autoclass can easily access the various information. fix_fields removed. Fixed #48

  • New ancestor_fields_first option in all the __init__ makers (make_init and @init_fields). Fixed #50

Bugfixes

  • Bugfixes in all the __init__ makers (make_init and @init_fields):

    • bugfix in case of inheritance with override: #49

    • the argument order used for fields initialization (inside the generated init method body) was sometimes incorrect. This would trigger a bug when one field was requiring another one to initialize.

    • when the list of fields received by InitDescriptor was an empty tuple and not None, the constructor was not created properly

See documentation page for details.