Detect unneeded async keywords on functions (#9966)
## Summary This change adds a rule to detect functions declared `async` but lacking any of `await`, `async with`, or `async for`. This resolves #9951. ## Test Plan This change was tested by following https://docs.astral.sh/ruff/contributing/#rule-testing-fixtures-and-snapshots and adding positive and negative cases for each of `await` vs nothing, `async with` vs `with`, and `async for` vs `for`.
This commit is contained in:
1
ruff.schema.json
generated
1
ruff.schema.json
generated
@@ -3619,6 +3619,7 @@
|
||||
"RUF026",
|
||||
"RUF027",
|
||||
"RUF028",
|
||||
"RUF029",
|
||||
"RUF1",
|
||||
"RUF10",
|
||||
"RUF100",
|
||||
|
||||
Reference in New Issue
Block a user