Skip to content

Rework WPS332: allow := in comprehensions #3121

@sobolevn

Description

@sobolevn

This code should be allowed:

users = [user for user_id in user_ids if (user := get_user(user_id)) is not None]

We only allow := in comprehensions / generator expressions now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestgood first issueEntrypoint to the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions