Skip to content

An equivalent of C417 for filter(lambda ...) #622

@SpecLad

Description

@SpecLad

Description

For the same reasons as described in C417, it would also make sense to have a checker that suggested similar changes for filter used in conjunction with lambda, e.g.:

filter(lambda x: y, items) -> (x for x in items if y)
list(filter(lambda x: y, items)) -> [x for x in items if y]
set(filter(lambda x: y, items)) -> {x for x in items if y}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions