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 ASYNC100 to match upstream #12221

Merged
merged 4 commits into from
Jul 9, 2024

Conversation

augustelalande
Copy link
Contributor

@augustelalande augustelalande commented Jul 7, 2024

Summary

Update the name of ASYNC100 to match upstream.

Also update to the functionality to match upstream by supporting additional context managers from asyncio and anyio. Matching this list.

Part of #12039.

Test Plan

Added the new context managers to the fixture.

@MichaReiser MichaReiser added rule Implementing or modifying a lint rule preview Related to preview mode features labels 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.

Awesome, thank you!

I think we should gate this change behind preview because it changes the scope of the rule.

@augustelalande
Copy link
Contributor Author

Not super straight forward to gate since it's just detecting a few additional context managers. I think there's precedence for not gating when just detecting more functions, e.g., #12065

@MichaReiser
Copy link
Member

The way this differs in my view from the numpy rule is that the NumPy rule was made more complete by including more of the deprecated methods. This PR introduces support for entire new async libraries, which extends the scope of the rule. @zanieb what's your take on this?

@augustelalande
Copy link
Contributor Author

Ok no problem. I did the gating.

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.

Thank you!

@charliermarsh charliermarsh enabled auto-merge (squash) July 9, 2024 17:52
@charliermarsh charliermarsh merged commit 88abc6a into astral-sh:main Jul 9, 2024
17 checks passed
@augustelalande augustelalande deleted the async100 branch July 9, 2024 17:59
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