Skip to content

Allow Filter when surrounded by a listΒ #170

Open
@ihoudjedje

Description

@ihoudjedje

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions