mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
Instead, parse them as usual and later report in the dedicated AssignTargetAnnotator and TypeAnnotationTargetAnnotator. This way, a PsiError element appearing in the PSI tree of a type declaration statement doesn't cause PyAstTypeDeclarationStatement.getTarget nullability contract violation. GitOrigin-RevId: a3e90088cfac7938c398d4d293a72dbd127a2cd0
19 lines
708 B
Python
19 lines
708 B
Python
<error descr="Starred assignment target must be in a list or tuple">*hi</error> = [1, 2]
|
|
*a, = range(5)
|
|
for a, *b in [(1, 2, 3), (4, 5, 6, 7)]:
|
|
print(b)
|
|
a, b, c = seq[0], seq[1:-1], seq[-1]
|
|
a, *b, c = seq
|
|
[a, *b, c] = seq
|
|
<error descr="Assignment to keyword">True</error> = 2
|
|
<error descr="Assignment to keyword">False</error> = 1
|
|
<error descr="Assignment to keyword">None</error> = 0
|
|
<error descr="Assignment to keyword">__debug__</error> = -1
|
|
|
|
() = []
|
|
[] = []
|
|
|
|
async def f():
|
|
<error descr="Cannot assign to await expression">await foo()</error> = 1
|
|
<error descr="An illegal target for a variable annotation"><error descr="Cannot assign to await expression">await foo()</error></error>: int = 1
|