---
source: crates/ruff_linter/src/rules/ruff/mod.rs
snapshot_kind: text
---
RUF029.py:38:11: RUF029 Function `fail_1a` is declared `async`, but doesn't `await` or use `async` features.
   |
38 | async def fail_1a():  # RUF029
   |           ^^^^^^^ RUF029
39 |     time.sleep(1)
   |

RUF029.py:42:11: RUF029 Function `fail_1b` is declared `async`, but doesn't `await` or use `async` features.
   |
42 | async def fail_1b():  # RUF029: yield does not require async
   |           ^^^^^^^ RUF029
43 |     yield "hello"
   |

RUF029.py:46:11: RUF029 Function `fail_2` is declared `async`, but doesn't `await` or use `async` features.
   |
46 | async def fail_2():  # RUF029
   |           ^^^^^^ RUF029
47 |     with None as i:
48 |         pass
   |

RUF029.py:51:11: RUF029 Function `fail_3` is declared `async`, but doesn't `await` or use `async` features.
   |
51 | async def fail_3():  # RUF029
   |           ^^^^^^ RUF029
52 |     for i in []:
53 |         pass
   |

RUF029.py:58:11: RUF029 Function `fail_4a` is declared `async`, but doesn't `await` or use `async` features.
   |
58 | async def fail_4a():  # RUF029: the /outer/ function does not await
   |           ^^^^^^^ RUF029
59 |     async def foo():
60 |         await bla
   |

RUF029.py:63:11: RUF029 Function `fail_4b` is declared `async`, but doesn't `await` or use `async` features.
   |
63 | async def fail_4b():  # RUF029: the /outer/ function does not await
   |           ^^^^^^^ RUF029
64 |     class Foo:
65 |         async def foo(self):
   |
