Skip to content

0.4.2

Choose a tag to compare

@aatle aatle released this 08 Feb 23:49
· 32 commits to main since this release
v0.4.2
493c121

More QOL improvements and an important bug fix.

Fixes

  • Fixed major problems in system unbinding (when using SystemManager.remove()) and improved performance
  • Fixed possible RecursionError in Entity.__repr__()

API Updates

  • New constant NULL_ID: an EntityId that is never in the EntityManager
  • Added discard() method to EntityManager, Entity, and StateManager
  • All built-in events are now dataclasses. Adds __eq__ and __repr__, and they are no longer hashable.
  • Added __repr__() to EntityManager, SystemManager, StateManager, Binding, and QueryResult
  • Added __eq__() to EntityManager, SystemManager, StateManager, and EventKeyFunctions
    • These types are no longer hashable
  • Some methods of EventKeyFunctions no longer accept keyword arguments
  • EventKeyFunctions.copy() returns an EventKeyFunctions instead of WeakKeyDictionary

Typing

  • Typing improvements, especially by annotating return type of dunder methods
  • Fixed problem when using dict() on EventKeyFunctions
  • Some internal variables marked with Final
  • Implementations of overloaded methods are now also typed

Internal

  • Formatted all code with standard conventions
  • Rewrote SystemManager._bind()

Other

  • Rewrote README
  • Added docstring for QueryResult.__call__()
  • Added more mypy and ruff checks