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

Make tuple treated the same as list and set #44

Merged
merged 2 commits into from
Apr 1, 2019

Conversation

Outfenneced
Copy link
Contributor

@Outfenneced Outfenneced commented Apr 1, 2019

Summary

Treats tuple the same as list and set in the flatten conversion. Also adds in two tests to prevent regression. Also collapses the or chain on the isinstance call for increased readability and ease of additions/subtractions.

Bug Fixes/New Features

  • Adds tuple to the structures flatten can support

How to Verify

Added two tests to verify:

  • A tuple with 1 or more values is expanded to its enumerated form: test_tuple
  • An empty tuple is left as an empty tuple and not expanded further test_empty_tuple

Side Effects

None

Resolves

None

Tests

All tests pass along with the two added tests: test_tuple and test_empty_tuple

Code Reviewer(s)

@amirziai

@pep8speaks
Copy link

pep8speaks commented Apr 1, 2019

Hello @Outfenneced! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-04-01 05:04:28 UTC

Also collapses `or` chains on the `isinstance` call to a tuple check
Copy link
Owner

@amirziai amirziai left a comment

Choose a reason for hiding this comment

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

Looks pretty good @Outfenneced. Thanks for contributing.

@amirziai amirziai merged commit e8e2cbb into amirziai:master Apr 1, 2019
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.

3 participants