flatten
flatten copied to clipboard
Iterable support
Checks object part is Iterable not (tuple, list, set)
Allows to use deal with numpy.arrays and subclasses inside the dictionaries.
thanks for contributing @guility . can you add a test that shows how not having this causes problems?
Hello @guility! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
- In the file
test_flatten.py:
Line 2186:1: W293 blank line contains whitespace
Comment last updated at 2019-10-22 16:49:27 UTC
@amirziai basically, if applying only to .jsons - there would be no such a problem. BTW, if you try using it with some basic dictionaries containing custom iterables or numpy.ndarrays(which caused me to contribute) - you would have an issue.
You could check the test case in my latest commit to test your code with custom iterable.
That's a great test! Thanks! Do you mind fixing the PEP8 issue too? See the comment from @pep8speaks ☝️
also your branch is behind master, please merge the latest.