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

[flake8-comprehensions] Do not lint async for comprehensions in unnecessary-comprehension-in-call (C419) #12895

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Aug 14, 2024

List and set comprehensions using async for cannot be replaced with underlying generators; this PR modifies C419 to skip such comprehensions.

Closes #12891.

@MichaReiser MichaReiser added the bug Something isn't working label Aug 14, 2024
Copy link
Contributor

github-actions bot commented Aug 14, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh self-requested a review August 15, 2024 00:52
@charliermarsh charliermarsh self-assigned this Aug 15, 2024
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks so much! Really appreciating your contributions.

@charliermarsh charliermarsh enabled auto-merge (squash) August 15, 2024 00:55
@charliermarsh charliermarsh merged commit 6dcd743 into astral-sh:main Aug 15, 2024
17 checks passed
@dylwil3 dylwil3 deleted the c419-no-async branch August 15, 2024 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: C419 incorrectly tries to remove list comprehension in async for
3 participants