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] Update ASYNC109 to match upstream #12236

Merged
merged 6 commits into from
Jul 9, 2024

Conversation

augustelalande
Copy link
Contributor

@augustelalande augustelalande commented Jul 8, 2024

Summary

Update the name of ASYNC109 to match upstream.

Also update to the functionality to match upstream by supporting additional context managers from asyncio and anyio. This doesn't change any of the detection functionality, but recommends additional context managers from asyncio and anyio depending on context.

Part of #12039.

Test Plan

Added fixture for asyncio recommendation

@MichaReiser MichaReiser added the rule Implementing or modifying a lint rule label Jul 8, 2024
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Thank you. This looks good to me.

The only change is that I think we should gate this behind preview-mode because it increases the scope of a non-preview rule.

Would you mind to extend the PR summary with a short explanation of what "match upstream" means (support anyio and asyncio). The person who has to write the changelog and people navigating to the PR from the changelog might find that helpful.

@augustelalande
Copy link
Contributor Author

Ok I restricted the rule to trio only unless preview is enabled

@augustelalande
Copy link
Contributor Author

I expanded the PR summary to make things a little clearer.

@charliermarsh charliermarsh self-assigned this Jul 9, 2024
@charliermarsh charliermarsh added the preview Related to preview mode features label Jul 9, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) July 9, 2024 04:10
@charliermarsh charliermarsh merged commit 16a63c8 into astral-sh:main Jul 9, 2024
18 checks passed
@augustelalande augustelalande deleted the async109 branch July 9, 2024 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants