void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement problemElement = descriptor.getPsiElement(); if (problemElement instanceof PyBinaryExpression binaryExpression) { PyElementType operator = binaryExpression.getOperator(); PyElementGenerator elementGenerator = PyElementGenerator.getInstance(project); String temp; temp = (operator == PyTokenTypes.EQEQ) ? "is" : "is not"; PyExpression expression = elementGenerator.createBinaryExpression(temp, binaryExpression.getLeftExpression(), binaryExpression.getRightExpression()); binaryExpression.replace(expression); } }