boolean (@NotNull PyClass pyClass, @NotNull TypeEvalContext context) { for (PyClass ancestor : pyClass.getAncestorClasses(context)) { if (StringUtil.isNotEmpty(ancestor.getDocStringValue())) { return true; } } return false; }