mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-11340 Invalid case for can't assign to literal inspection
This commit is contained in:
@@ -588,26 +588,26 @@ refactoring.change.signature.find.usages.of.base.class=Method {0} of class {1}\n
|
||||
refactoring.change.signature.error.wrong.caret.position.method.name=The caret should be positioned at the name of the method to be refactored.
|
||||
|
||||
### Annotators ###
|
||||
ANN.deleting.none=deleting None
|
||||
ANN.assign.to.none=assignment to None
|
||||
ANN.cant.assign.to.call=can't assign to function call
|
||||
ANN.cant.delete.call=can't delete function call
|
||||
ANN.cant.aug.assign.to.generator=augmented assign to generator expression not possible
|
||||
ANN.cant.aug.assign.to.tuple.or.generator=augmented assign to tuple literal or generator expression not possible
|
||||
ANN.cant.assign.to.generator=assign to generator expression not possible
|
||||
ANN.cant.assign.to.operator=can't assign to operator
|
||||
ANN.cant.assign.to.parens=can't assign to ()
|
||||
ANN.cant.assign.to.brackets=can't assign to []
|
||||
ANN.cant.aug.assign.to.list.or.comprh=augmented assign to list literal or comprehension not possible
|
||||
ANN.cant.assign.to.comprh=can't assign to list comprehension
|
||||
ANN.cant.assign.to.dict.comprh=can't assign to dict comprehension
|
||||
ANN.cant.assign.to.set.comprh=can't assign to set comprehension
|
||||
ANN.cant.aug.assign.to.comprh=augmented assign to list comprehension not possible
|
||||
ANN.cant.aug.assign.to.dict.comprh=augmented assign to dict comprehension not possible
|
||||
ANN.cant.aug.assign.to.set.comprh=augmented assign to set comprehension not possible
|
||||
ANN.cant.assign.to.literal=can't assign to literal
|
||||
ANN.cant.delete.literal=can't delete literal
|
||||
ANN.cant.assign.to.lambda=can't assign to lambda
|
||||
ANN.deleting.none=Deleting None
|
||||
ANN.assign.to.none=Assignment to None
|
||||
ANN.cant.assign.to.call=Can't assign to function call
|
||||
ANN.cant.delete.call=Can't delete function call
|
||||
ANN.cant.aug.assign.to.generator=Augmented assign to generator expression not possible
|
||||
ANN.cant.aug.assign.to.tuple.or.generator=Augmented assign to tuple literal or generator expression not possible
|
||||
ANN.cant.assign.to.generator=Assign to generator expression not possible
|
||||
ANN.cant.assign.to.operator=Can't assign to operator
|
||||
ANN.cant.assign.to.parens=Can't assign to ()
|
||||
ANN.cant.assign.to.brackets=Can't assign to []
|
||||
ANN.cant.aug.assign.to.list.or.comprh=Augmented assign to list literal or comprehension not possible
|
||||
ANN.cant.assign.to.comprh=Can't assign to list comprehension
|
||||
ANN.cant.assign.to.dict.comprh=Can't assign to dict comprehension
|
||||
ANN.cant.assign.to.set.comprh=Can't assign to set comprehension
|
||||
ANN.cant.aug.assign.to.comprh=Augmented assign to list comprehension not possible
|
||||
ANN.cant.aug.assign.to.dict.comprh=Augmented assign to dict comprehension not possible
|
||||
ANN.cant.aug.assign.to.set.comprh=Augmented assign to set comprehension not possible
|
||||
ANN.cant.assign.to.literal=Can't assign to literal
|
||||
ANN.cant.delete.literal=Can't delete literal
|
||||
ANN.cant.assign.to.lambda=Can't assign to lambda
|
||||
|
||||
ANN.break.outside.loop='break' outside loop
|
||||
ANN.continue.outside.loop='continue' outside loop
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
with open("") as <error descr="can't assign to operator">my_<<var</error>:
|
||||
with open("") as <error descr="Can't assign to operator">my_<<var</error>:
|
||||
pass
|
||||
@@ -1,31 +1,31 @@
|
||||
# fail
|
||||
|
||||
<error descr="can't assign to function call">int(1)</error> = 1
|
||||
<error descr="Can't assign to function call">int(1)</error> = 1
|
||||
|
||||
<error descr="can't assign to literal">12</error> = 1
|
||||
<error descr="Can't assign to literal">12</error> = 1
|
||||
|
||||
<error descr="can't assign to operator">1 + 21</error> = 12
|
||||
<error descr="Can't assign to operator">1 + 21</error> = 12
|
||||
|
||||
result = <error descr="can't assign to operator">a < c and c</error> = 4
|
||||
result = <error descr="Can't assign to operator">a < c and c</error> = 4
|
||||
|
||||
<error descr="can't assign to ()">()</error> = 123
|
||||
<error descr="can't assign to []">[]</error> = 1
|
||||
[<error descr="can't assign to literal">1</error>] = 1
|
||||
<error descr="can't assign to literal">{}</error> = 1
|
||||
<error descr="can't assign to literal">{1, 2, 3}</error> = 1
|
||||
<error descr="Can't assign to ()">()</error> = 123
|
||||
<error descr="Can't assign to []">[]</error> = 1
|
||||
[<error descr="Can't assign to literal">1</error>] = 1
|
||||
<error descr="Can't assign to literal">{}</error> = 1
|
||||
<error descr="Can't assign to literal">{1, 2, 3}</error> = 1
|
||||
|
||||
(<error descr="can't assign to literal">1</error>,(<error descr="can't assign to literal">2</error>, <error descr="can't assign to literal">3</error>)) = 3,(4,5)
|
||||
del <error descr="can't delete literal">1</error>
|
||||
del <error descr="can't delete function call">int()</error>
|
||||
(<error descr="Can't assign to literal">1</error>,(<error descr="Can't assign to literal">2</error>, <error descr="Can't assign to literal">3</error>)) = 3,(4,5)
|
||||
del <error descr="Can't delete literal">1</error>
|
||||
del <error descr="Can't delete function call">int()</error>
|
||||
|
||||
for <error descr="can't assign to literal">1</error> in []:
|
||||
for <error descr="Can't assign to literal">1</error> in []:
|
||||
pass
|
||||
|
||||
for (<error descr="can't assign to literal">1</error>,(<error descr="can't assign to literal">2</error>,)) in [12]:
|
||||
for (<error descr="Can't assign to literal">1</error>,(<error descr="Can't assign to literal">2</error>,)) in [12]:
|
||||
pass
|
||||
|
||||
<error descr="augmented assign to dict comprehension not possible">{ x: y for y, x in ((1, 2), (3, 4)) }</error> += 5
|
||||
<error descr="can't assign to set comprehension">{ x for x in (1, 2) }</error> = 5
|
||||
<error descr="Augmented assign to dict comprehension not possible">{ x: y for y, x in ((1, 2), (3, 4)) }</error> += 5
|
||||
<error descr="Can't assign to set comprehension">{ x for x in (1, 2) }</error> = 5
|
||||
|
||||
# ok
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ b = a.readonly
|
||||
|
||||
<warning descr="Property 'readonly' cannot be set">a.readonly</warning> += 1
|
||||
del <warning descr="Property 'readonly' cannot be deleted">a.readonly</warning>
|
||||
del <error descr="can't delete function call">a.readonly()</error> # Error, delete the result of function
|
||||
del <error descr="Can't delete function call">a.readonly()</error> # Error, delete the result of function
|
||||
|
||||
a.writeonly = 1
|
||||
<warning descr="Property 'writeonly' cannot be read">a.writeonly</warning> += 1
|
||||
|
||||
@@ -13,7 +13,7 @@ PyFile:WithMissingID.py
|
||||
PsiElement(Py:RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:AS_KEYWORD)('as')
|
||||
PsiErrorElement:identifier expected
|
||||
PsiErrorElement:Identifier expected
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:COLON)(':')
|
||||
|
||||
Reference in New Issue
Block a user