Skip to content

Conversation

@strohganoff
Copy link
Owner

Remove generics from the event models, instead opting for a subscriptable base using __class_getitem__() and returning specialized subclasses based on the literal strings passed in.
Generic EventBase models worked great, but typing the code around them was becoming a complex nuisance.
This solution isn't actually much more complex, but should reduce the complexity of typing EventBase elsewhere in the codebase.

@strohganoff strohganoff merged commit a2ed941 into main Apr 25, 2025
1 check passed
@strohganoff strohganoff deleted the refactor/eventbase-subscripting branch April 25, 2025 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants