Skip to content

Refactor/eventbase subscripting #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 25, 2025
Merged

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.

1 participant