void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement(); PyPsiUtils.assertValid(element); if (!element.isValid() || !(element instanceof PyBinaryExpression)) { return; } PyElementGenerator elementGenerator = PyElementGenerator.getInstance(project); element.replace(elementGenerator.createExpressionFromText(LanguageLevel.forElement(element), myReplacementText)); }