0.4.2
More QOL improvements and an important bug fix.
Fixes
- Fixed major problems in system unbinding (when using
SystemManager.remove()) and improved performance - Fixed possible
RecursionErrorinEntity.__repr__()
API Updates
- New constant
NULL_ID: anEntityIdthat is never in theEntityManager - Added
discard()method toEntityManager,Entity, andStateManager - All built-in events are now dataclasses. Adds
__eq__and__repr__, and they are no longer hashable. - Added
__repr__()toEntityManager,SystemManager,StateManager,Binding, andQueryResult - Added
__eq__()toEntityManager,SystemManager,StateManager, andEventKeyFunctions- These types are no longer hashable
- Some methods of
EventKeyFunctionsno longer accept keyword arguments EventKeyFunctions.copy()returns anEventKeyFunctionsinstead ofWeakKeyDictionary
Typing
- Typing improvements, especially by annotating return type of dunder methods
- Fixed problem when using
dict()onEventKeyFunctions - 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