Skip to content

2.0.0 - `pyfields` support + major refactoring

Compare
Choose a tag to compare
@smarie smarie released this 16 Nov 14:42
· 27 commits to master since this release

Features

  • default string representation in @autodict is now more readable. Legacy representation is still available through a parameter. Fixed #29.

  • pyfields can now be used as the source for the list of attributes, in @autohash, @autodict, and @autoclass. Fixes #28

  • new @autorepr decorator. Previously this feature was only available through @autodict, it can now be used without it. autorepr is supported in @autoclass, and if users set autodict=False by default it will be enabled. Fixed Fixed #30 and #31.

Misc / bugfixes

  • Major refactoring: more readable and maintainable code.

  • Fixed @autodict behaviour when the list was vars(self) and used together with @autoprops: with some options the private names were appearing and with others the public property names were appearing. Now the public property names always appear if they exist.

See documentation page for details.