void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element = descriptor.getPsiElement(); final PyClass pyClass = PsiTreeUtil.getParentOfType(element, PyClass.class); assert pyClass != null; final PyElementGenerator generator = PyElementGenerator.getInstance(project); final PyArgumentList expressionList = pyClass.getSuperClassExpressionList(); if (expressionList != null) { final PyExpression object = generator.createExpressionFromText(LanguageLevel.forElement(element), "object"); expressionList.addArgumentFirst(object); } else { final PyArgumentList list = generator.createFromText(LanguageLevel.forElement(element), PyClass.class, "class A(object):pass").getSuperClassExpressionList(); assert list != null; final ASTNode node = pyClass.getNameNode(); assert node != null; final PsiElement oldArgList = node.getPsi().getNextSibling(); if (oldArgList instanceof PyArgumentList) { oldArgList.replace(list); } } }