fixed improper cleanup from 2/18/13

This commit is contained in:
Ekaterina Tuzova
2013-02-25 17:34:34 +04:00
parent 66c7b9b5d8
commit fe58bce1d2
3 changed files with 7 additions and 1 deletions
@@ -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();
}