mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
[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:
parent
127a45622f
commit
0891689d2f
5 changed files with 433 additions and 0 deletions
|
@ -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)
|
|
@ -0,0 +1,7 @@
|
|||
# parse_options: {"target-version": "3.13"}
|
||||
a: (x := 1)
|
||||
def outer():
|
||||
b: (yield 1)
|
||||
c: (yield from 1)
|
||||
async def outer():
|
||||
d: (await 1)
|
Loading…
Add table
Add a link
Reference in a new issue