---
source: crates/ruff_linter/src/linter.rs
---
invalid-syntax: cannot use an asynchronous comprehension inside of a synchronous comprehension on Python 3.10 (syntax was added in 3.11)
 --> resources/test/fixtures/syntax_errors/async_comprehension.ipynb:3:5
  |
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
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
