void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement assignment = descriptor.getPsiElement(); if (assignment instanceof PyAssignmentStatement) { final PyExpression value = ((PyAssignmentStatement)assignment).getAssignedValue(); if (value != null) { PyElementGenerator elementGenerator = PyElementGenerator.getInstance(project); final PyExpressionStatement newStatement = elementGenerator.createFromText(LanguageLevel.forElement(assignment), PyExpressionStatement.class, value.getText()); assignment.replace(newStatement); } } }