ruff
c2b2eda9 - [`flake8-async`] Document thread offloading (`ASYNC240`) (#28008)

Commit
1 day ago
[`flake8-async`] Document thread offloading (`ASYNC240`) (#28008) ## Summary Document `asyncio.to_thread` and `loop.run_in_executor` as alternatives for ASYNC240 and make the diagnostic library-neutral. I noticed that ASYNC240's message and documentation recommended anyio and trio as alternatives to blocking path operations. This is confusing in projects where anyio or trio are not used. When making the change I also noticed some other issues (the rule reports `os.path` _functions_ rather than methods and the docs referenced a nonexistent `pathlib.Path.dirname` method). Adds a reference to aiofiles which is a very popular library for async path operations. ## Test Plan Built the docs and looked at it.
Author
Parents
Loading