ruff/crates/ty_python_semantic/resources/mdtest/diagnostics
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
..
attribute_assignment.md [ty] Rename "possibly unbound" diagnostics to "possibly missing" (#20492) 2025-09-23 14:26:55 +00:00
invalid_argument_type.md
invalid_assignment.md [ty] Better invalid-assignment diagnostics (#21476) 2025-11-18 14:31:04 +01:00
invalid_await.md [ty] Rename "possibly unbound" diagnostics to "possibly missing" (#20492) 2025-09-23 14:26:55 +00:00
legacy_typevars.md [ty] defer inference of legacy TypeVar bound/constraints/defaults (#20598) 2025-10-09 21:08:37 +00:00
missing_argument.md [ty] Improve diagnostics for bad calls to functions (#20022) 2025-08-21 22:00:44 +01:00
no_matching_overload.md
same_names.md [ty] support generic aliases in type[...], like type[C[int]] (#21552) 2025-11-24 13:56:42 -08:00
semantic_syntax_errors.md Fix syntax error false positives for await outside functions (#21763) 2025-12-02 21:02:02 +00:00
shadowing.md
single_matching_overload.md
too_many_positionals.md [ty] Improve diagnostics for bad calls to functions (#20022) 2025-08-21 22:00:44 +01:00
union_call.md [ty] Truncate Literal type display in some situations (#20928) 2025-10-17 11:50:58 +00:00
unknown_argument.md [ty] Improve diagnostics for bad calls to functions (#20022) 2025-08-21 22:00:44 +01:00
unpacking.md
unresolved_import.md
unresolved_reference.md
unsupported_bool_conversion.md
version_related_syntax_errors.md