Allow Filter when surrounded by a list #170
Copy link
Copy link
Open
Description
In case having list(filter(None, my_list)) in py2.* , to be able to generate a six compatible python code, the tool transforms the latter to a one-line list comprehension list([_f for _f in my_list if _f]) !!
I understand that the filter function doesn't return a list in py3.* and that we should wrap it in a list in order to have so, but in such situations as the one described above, the filter is already surrounded by list so the code is already a py2&3 compatible and the tool can ignore it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity