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

remove add_code_with_parameters and use optional parameters #8

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

divarvel
Copy link
Collaborator

@divarvel divarvel commented Jun 21, 2023

Python (and pyo3) handle optional parameters very well, so we don't need separated add_code and add_code_with_parameters (and that's what constructors were already doing, anyway).

add_code was not directly covered in the test cases, so i added test cases as well.

Copy link

@Tipnos Tipnos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic looks fine to me.

Could be more readable by factorizing add_code boilerplate code duplicated 3 times.

@divarvel divarvel merged commit b5c0c54 into main Jun 21, 2023
@divarvel divarvel deleted the rationalize-add-code branch June 21, 2023 13:34
@divarvel
Copy link
Collaborator Author

helper functions for generating the adapted hashmaps could help indeed.

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.

2 participants