ruff/crates/ruff_linter/resources/test
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
..
fixtures Fix syntax error false positives for `await` outside functions (#21763) 2025-12-02 21:02:02 +00:00
package Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
project Show partial fixability indicator in statistics output (#21513) 2025-11-27 18:03:36 +01:00
__init__.py [`pylint`] (Re-)Implement `import-private-name` (`C2701`) (#9553) 2024-01-16 14:03:11 -05:00
disallowed_rule_names.txt Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00