Skip to content
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

Refactor to generating S2Message class #73

Open
Flix6x opened this issue Jan 15, 2025 · 0 comments
Open

Refactor to generating S2Message class #73

Flix6x opened this issue Jan 15, 2025 · 0 comments

Comments

@Flix6x
Copy link
Collaborator

Flix6x commented Jan 15, 2025

          We already have a version of this file in `generate_s2_message_type_to_class.py` to generate a mapping from `message_type` literals into the appropriate class. You are using it to generate a list of all message types into an alternative `S2Message` type which only contains messages.

I think we can combine the 2. My proposal would be to move TYPE_TO_MESSAGE_CLASS to the new src/s2python/message.py file and generate this entire file with a single script. The result would be that we generate both the TYPE_TO_MESSAGE_CLASS constant as well as the S2Message type.

Originally posted by @lfse-slafleur in #37 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant