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

Use underscore suffix instead of prefix for primitive #6 #18

Merged
merged 8 commits into from
Dec 15, 2024

Conversation

ruscoder
Copy link
Member

@ruscoder ruscoder commented Sep 3, 2024

Within this PR I've changed the underscore prefix to the underscore suffix. Moreover, in the code, it was already used for keywords like for_, class_. See my last comment #6 for details.

Also, I've overridden the base model class changing dict() behavior to return the alias name by default. (Closes #17)

@ruscoder ruscoder requested a review from m0rl September 3, 2024 00:55
@ruscoder
Copy link
Member Author

ruscoder commented Sep 3, 2024

Having _ is not enough because it overlaps with reserved keywords, e.g. import_: str and import_: Element. So, I decided to adhere to fhir.resources python library where it's exposed as __ext suffix.

@ruscoder
Copy link
Member Author

ruscoder commented Sep 6, 2024

I clean up the code by merging into main small pieces:

@ruscoder ruscoder merged commit b899df3 into main Dec 15, 2024
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

Successfully merging this pull request may close these issues.

Reserved keywords are not dumped by dict by default
1 participant