Skip to content

[flake8-async] allow async generators (ASYNC100)#13639

Merged
zanieb merged 2 commits intoastral-sh:mainfrom
autinerd:async100-allow-async-generators
Oct 7, 2024
Merged

[flake8-async] allow async generators (ASYNC100)#13639
zanieb merged 2 commits intoastral-sh:mainfrom
autinerd:async100-allow-async-generators

Conversation

@autinerd
Copy link
Copy Markdown
Contributor

@autinerd autinerd commented Oct 5, 2024

Summary

Treat async generators as "await" in ASYNC100.

Fixes #13637

Test Plan

Updated snapshot

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