ruff/crates/ruff_python_parser/tests
Brent Westbrook 014bb526f4
[syntax-errors] await outside async functions (#17363)
Summary
--

This PR implements detecting the use of `await` expressions outside of
async functions. This is a reimplementation of
[await-outside-async
(PLE1142)](https://docs.astral.sh/ruff/rules/await-outside-async/) as a
semantic syntax error.

Despite the rule name, PLE1142 also applies to `async for` and `async
with`, so these are covered here too.

Test Plan
--

Existing PLE1142 tests.

I also deleted more code from the `SemanticSyntaxCheckerVisitor` to
avoid changes in other parser tests.
2025-04-14 13:01:48 -04:00
..
snapshots Refactor semantic syntax error scope handling (#17314) 2025-04-09 14:23:29 -04:00
fixtures.rs [syntax-errors] await outside async functions (#17363) 2025-04-14 13:01:48 -04:00
generate_inline_tests.rs [syntax-errors] Start detecting compile-time syntax errors (#16106) 2025-03-21 14:45:25 -04:00