Tags: tdowrick/ruff
Tags
Add some additional users to "Who's Using Ruff?" (astral-sh#3035)
Implement `asyncio-dangling-task` to track `asyncio.create_task` calls ( astral-sh#2935) This rule guards against `asyncio.create_task` usages of the form: ```py asyncio.create_task(coordinator.ws_connect()) # Error ``` ...which can lead to unexpected bugs due to the lack of a strong reference to the created task. See Will McGugan's blog post for reference: https://textual.textualize.io/blog/2023/02/11/the-heisenbug-lurking-in-your-async-code/. Note that we can't detect issues like: ```py def f(): # Stored as `task`, but never used... task = asyncio.create_task(coordinator.ws_connect()) ``` So that would be a false negative. But this catches the common case of failing to assign the task in any way. Closes astra 7909 l-sh#2809.
PreviousNext