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-async] allow async generators (ASYNC100) #13639

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

autinerd
Copy link
Contributor

@autinerd autinerd commented Oct 5, 2024

Summary

Treat async generators as "await" in ASYNC100.

Fixes #13637

Test Plan

Updated snapshot

Copy link
Contributor

github-actions bot commented Oct 5, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@zanieb
Copy link
Member

zanieb commented Oct 5, 2024

Actually, if I add this test case to main I don't see a violation (i.e., the snapshots do not change) but if I use your example from the issue they do. It seems like your new test case is not sufficient, can you add one that raises the false positive?

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

(needs described test change)

@autinerd
Copy link
Contributor Author

autinerd commented Oct 5, 2024

I have changed the test.

@MichaReiser MichaReiser added the rule Implementing or modifying a lint rule label Oct 7, 2024
@MichaReiser MichaReiser requested a review from zanieb October 7, 2024 09:20
@zanieb zanieb merged commit 31ca1c3 into astral-sh:main Oct 7, 2024
20 checks passed
@autinerd autinerd deleted the async100-allow-async-generators branch October 11, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[flake8-async] ASYNC100 false positive in async generator expressions
3 participants