ruff/crates/ruff_python_parser/tests
Brent Westbrook ffef71d106
[syntax-errors] yield, yield from, and await outside functions (#17298)
Summary
--

This PR reimplements [yield-outside-function
(F704)](https://docs.astral.sh/ruff/rules/yield-outside-function/) as a
semantic syntax error. Despite the name, this rule covers `yield from`
and `await` in addition to `yield`.

Test Plan
--

New linter tests, along with the existing F704 test.

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2025-04-11 10:16:23 -04:00
..
snapshots Refactor semantic syntax error scope handling (#17314) 2025-04-09 14:23:29 -04:00
fixtures.rs [syntax-errors] yield, yield from, and await outside functions (#17298) 2025-04-11 10:16:23 -04:00
generate_inline_tests.rs [syntax-errors] Start detecting compile-time syntax errors (#16106) 2025-03-21 14:45:25 -04:00