PyStringLiteralExpression (@NotNull PyFunction fun, @NotNull String methodName) { final PyClassType objectType = PyBuiltinCache.getInstance(fun).getObjectType(); // old- and new-style classes share the __xxx__ stuff if (objectType != null) { final PyClass objectClass = objectType.getPyClass(); final PyFunction predefinedMethod = objectClass.findMethodByName(methodName, false, null); if (predefinedMethod != null) { final PyStringLiteralExpression predefinedDocstring = getEffectiveDocStringExpression(predefinedMethod); final String predefinedDoc = predefinedDocstring != null ? predefinedDocstring.getStringValue() : null; if (predefinedDoc != null && !predefinedDoc.isEmpty()) { mySectionsMap.get(PyPsiBundle.message("QDOC.copied.from")).append(PyPsiBundle.message("QDOC.built.in.description")); myContent.append(safeRunFormatterService(fun, predefinedDoc)); } return predefinedDocstring; } } return null; }