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

Allow subset of operations #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

blustrini
Copy link

@blustrini blustrini commented Jan 26, 2021

Allow subset of operations, keeping back-compatibility (issue #37).

Operation type still passed as --type, but can now concatenate operation types, e.g. --type=+- to do addition and subtraction. --type=mix still does all the operations.

Types are now passed to the object as a tuple of allowed operation strings, e.g. ('+', '-'), which saved to the attribute all_types. Method generate_question then draws from self.all_types every time.

This is my first ever pull-request, btw so let me know if I am doing anything wrong.

@blustrini blustrini changed the title Allow subset of operations #37 Allow subset of operations Jan 26, 2021
@blustrini
Copy link
Author

Changed the input argument to types and didn't change the tests, so they have failed.

@blustrini
Copy link
Author

Tests seem to pass, but probably needs some more tests to test the new functionality.

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.

None yet

1 participant