void (final @NotNull PyAssignmentStatement node) { final PyExpression target = node.getLeftHandSideExpression(); final PyBinaryExpression value = PyUtil.as(node.getAssignedValue(), PyBinaryExpression.class); if (target != null && value != null) { final PyExpression leftExpression = value.getLeftExpression(); final PyExpression rightExpression = PyPsiUtils.flattenParens(value.getRightExpression()); if (leftExpression == null || rightExpression == null) { return; } final String targetText = target.getText(); final PyExpression mainOperandExpression; final PyExpression otherOperandExpression; final boolean changedParts; if (targetText.equals(leftExpression.getText())) { mainOperandExpression = leftExpression; otherOperandExpression = rightExpression; changedParts = false; } else if (targetText.equals(rightExpression.getText())) { mainOperandExpression = rightExpression; otherOperandExpression = leftExpression; changedParts = true; } else { return; } final PyElementType operator = value.getOperator(); if (operator != null && assignmentCanBeReplaced(mainOperandExpression, otherOperandExpression, operator, changedParts)) { registerProblem(node, PyPsiBundle.message("INSP.assignment.can.be.replaced.with.augmented.assignment"), new AugmentedAssignmentQuickFix()); } } }