[syntax-errors] Check annotations in annotated assignments (#17283)

Summary
--

This PR extends the checks in #17101 and #17282 to annotated assignments
after Python 3.13.

Currently stacked on #17282 to include `await`.

Test Plan
--

New inline tests. These are simpler than the other cases because there's
no place to put generics.
This commit is contained in:
Brent Westbrook 2025-04-08 08:56:25 -04:00 committed by GitHub
parent 127a45622f
commit 0891689d2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 433 additions and 0 deletions

View file

@ -0,0 +1,7 @@
# parse_options: {"target-version": "3.14"}
a: (x := 1)
def outer():
b: (yield 1)
c: (yield from 1)
async def outer():
d: (await 1)