void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PyDocStringOwner docStringOwner = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PyDocStringOwner.class); if (docStringOwner == null) return; PyStringLiteralExpression docStringExpression = docStringOwner.getDocStringExpression(); if (docStringExpression == null && myMissingParam == null && myUnexpectedParamName == null) { addEmptyDocstring(docStringOwner); return; } if (docStringExpression != null) { final PyDocstringGenerator generator = PyDocstringGenerator.forDocStringOwner(docStringOwner); if (myMissingParam != null) { final PyNamedParameter param = myMissingParam.getElement(); if (param != null) { generator.withParam(param); } } else if (myUnexpectedParamName != null) { generator.withoutParam(myUnexpectedParamName.trim()); } generator.buildAndInsert(); } }