Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework WPS332: allow := in comprehensions #3121

Closed
sobolevn opened this issue Dec 11, 2024 · 0 comments · Fixed by #3129
Closed

Rework WPS332: allow := in comprehensions #3121

sobolevn opened this issue Dec 11, 2024 · 0 comments · Fixed by #3129
Labels
feature New feature or request good first issue Entrypoint to the project

Comments

@sobolevn
Copy link
Member

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.

@sobolevn sobolevn added feature New feature or request good first issue Entrypoint to the project labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Entrypoint to the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant