Skip to content

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.

1 participant