clk-project / clk

A very opinionated framework to ease the creation of command line interfaces
https://clk-project.org/
MIT License
22 stars 6 forks source link

Ensure that elements reduced in flat_map are of type list #23

Closed neomatamune closed 1 year ago

neomatamune commented 1 year ago

PR applying the code proposed in issue #22

Konubinix commented 1 year ago

Thank you

It needs to have some added tests highlighting the issue before it can be merged.

I plan to add use case tests about the associated issue.

In the mean time, can you provide in the docstring of the function the tests using data that cause the problematic behavior, so that we can see the test pass now with your fix?

Thank you again for your contribution.

neomatamune commented 1 year ago

I added a test at the end of tests/test_lib.py that take 3 ways I could think of to use flat_map. Other ways could be used, but most of the time I think, it would either be via tuples or dicts

Konubinix commented 1 year ago

Thank you for your contribution :-). I'll take it from here.

Konubinix commented 1 year ago

Thank you again for your contribution