---
source: crates/ruff_linter/src/linter.rs
---
resources/test/fixtures/syntax_errors/async_comprehension.ipynb:3:5: SyntaxError: cannot use an asynchronous comprehension outside of an asynchronous function on Python 3.10 (syntax was added in 3.11)
  |
1 | async def elements(n): yield n
2 | [x async for x in elements(5)]  # okay, async at top level
3 | [[x async for x in elements(5)] for i in range(5)]  # error on 3.10, okay after
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
