flatten icon indicating copy to clipboard operation
flatten copied to clipboard

Iterable support

Open guility opened this issue 6 years ago • 5 comments

Checks object part is Iterable not (tuple, list, set)

Allows to use deal with numpy.arrays and subclasses inside the dictionaries.

guility avatar Oct 09 '19 18:10 guility

thanks for contributing @guility . can you add a test that shows how not having this causes problems?

amirziai avatar Oct 22 '19 15:10 amirziai

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

Line 2186:1: W293 blank line contains whitespace

Comment last updated at 2019-10-22 16:49:27 UTC

pep8speaks avatar Oct 22 '19 16:10 pep8speaks

@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.

guility avatar Oct 22 '19 16:10 guility

That's a great test! Thanks! Do you mind fixing the PEP8 issue too? See the comment from @pep8speaks ☝️

amirziai avatar Oct 22 '19 18:10 amirziai

also your branch is behind master, please merge the latest.

amirziai avatar Oct 22 '19 18:10 amirziai