Skip to content

v0.3.0

Choose a tag to compare

@wise0704 wise0704 released this 10 Mar 03:43
· 26 commits to master since this release

Breaking Changes:

  • @events decorator
    • Argument prefix is removed.
    • The generated __init__ method will always call the original or the super __init__ method before assigning event fields.
    • Accepts both Event and event annotations simultaneously and generates necessary fields/properties if any is found.

Added:

  • event_key() can be used to use a different key when using the @events decorator for event properties.

Changed:

  • EventHandlerCollection is now @runtime_checkable.
  • @events will look for an annotation of type EventHandlerCollection if collection attribute name is not specified.
  • event() constructor also accepts a direct accessor tuple instead of a function returning an accessor tuple.

Full Changelog: v0.2.2...v0.3.0