ruff icon indicating copy to clipboard operation
ruff copied to clipboard

[`flake8-async`] Update `ASYNC100` to match upstream

Open augustelalande opened this issue 1 year ago • 1 comments

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.

augustelalande avatar Jul 07 '24 06:07 augustelalande

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

augustelalande avatar Jul 08 '24 19:07 augustelalande

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?

MichaReiser avatar Jul 09 '24 07:07 MichaReiser

Ok no problem. I did the gating.

augustelalande avatar Jul 09 '24 17:07 augustelalande