List<String> (@Nullable TypeEvalContext context) { final Set<String> result = new LinkedHashSet<>(); final PyClassType currentType = new PyClassTypeImpl(this, true); final TypeEvalContext contextToUse = notNullizeContext(context); for (PyClassLikeType type : Iterables.concat(Collections.singletonList(currentType), getAncestorTypes(contextToUse))) { if (!(type instanceof PyClassType)) return null; final PyClass cls = ((PyClassType)type).getPyClass(); if (PyUtil.isObjectClass(cls)) { continue; } if (!cls.isNewStyleClass(contextToUse)) return null; final List<String> ownSlots = cls.getOwnSlots(); if (ownSlots == null || ownSlots.contains(PyNames.DUNDER_DICT)) { return null; } result.addAll(ownSlots); } return new ArrayList<>(result); }