mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
fixed improper cleanup from 2/18/13
This commit is contained in:
@@ -72,7 +72,7 @@ public class PyAugmentAssignmentInspection extends PyInspection {
|
||||
PyTokenTypes.EXP);
|
||||
final TokenSet commutativeOperations = TokenSet.create(PyTokenTypes.PLUS, PyTokenTypes.MULT);
|
||||
if ((operations.contains(op) && !changedParts) || (changedParts && commutativeOperations.contains(op))) {
|
||||
if (leftExpression instanceof PyReferenceExpression || leftExpression instanceof PySubscriptionExpression) {
|
||||
if (leftExpression.getText().equals(targetText) && (leftExpression instanceof PyReferenceExpression || leftExpression instanceof PySubscriptionExpression)) {
|
||||
final PyType type = myTypeEvalContext.getType(rightExpression);
|
||||
if (type != null && !PyTypeChecker.isUnknown(type)) {
|
||||
final PyBuiltinCache cache = PyBuiltinCache.getInstance(rightExpression);
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
a = "test"
|
||||
var = a + "some "
|
||||
@@ -19,6 +19,10 @@ public class PyAugmentAssignmentInspectionTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNegativeName() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNegative() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user