ruff/crates/ruff_python_parser/tests
Brent Westbrook 2250fa6f98
Fix syntax error false positives for `await` outside functions (#21763)
## Summary

Fixes #21750 and a related bug in `PLE1142`. We were not properly
considering generators to be valid `await` contexts, which caused the
`F704` issue. One of the tests I added for this also uncovered an issue
in `PLE1142` for comprehensions nested within async generators because
we were only checking the current scope rather than traversing the
nested context.

## Test Plan

Both of these rules are implemented as semantic syntax errors, so I
added tests (and fixes) in both Ruff and ty.
2025-12-02 21:02:02 +00:00
..
snapshots [`parser`] Fix panic when parsing IPython escape command expressions (#21480) 2025-11-24 05:40:27 +00:00
fixtures.rs Fix syntax error false positives for `await` outside functions (#21763) 2025-12-02 21:02:02 +00:00
generate_inline_tests.rs Update Rust crate anyhow to v1.0.100 (#20499) 2025-09-22 09:51:52 +02:00