Skip to content

Allow subset of operations - #38

Open
blustrini wants to merge 4 commits into
januschung:masterfrom
blustrini:iss37
Open

Allow subset of operations#38
blustrini wants to merge 4 commits into
januschung:masterfrom
blustrini:iss37

Conversation

@blustrini

@blustrini blustrini commented Jan 26, 2021

Copy link
Copy Markdown

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
Copy Markdown
Author

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

@blustrini

Copy link
Copy Markdown
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