Skip to content

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

Merged
charliermarsh merged 3 commits intoastral-sh:mainfrom
dylwil3:c419-no-async
Aug 15, 2024
Merged

[flake8-comprehensions] Do not lint async for comprehensions in unnecessary-comprehension-in-call (C419)#12895
charliermarsh merged 3 commits intoastral-sh:mainfrom
dylwil3:c419-no-async

Conversation

@dylwil3
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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
@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