Set<String> (boolean inherited, @NotNull TypeEvalContext context) { // PyNamedTupleType.getMemberNames provide names that we are not able to visit, // so this method could not be replaced with PyClassLikeType.visitMembers final Set<String> result = new LinkedHashSet<>(); processMembers( element -> { if (element instanceof PsiNamedElement) ContainerUtil.addIfNotNull(result, ((PsiNamedElement)element).getName()); return true; } ); processOwnSlots( slot -> { result.add(slot); return true; }, context ); processProvidedMembers( member -> { result.add(member.getName()); return true; }, null, context ); if (inherited) { prepareTypesForProcessingMembers(getAncestorTypes(context)) .flatCollection(type -> type.getMemberNames(false, context)) .into(result); processMetaClassMembers( typeType -> result.addAll(typeType.getMemberNames(true, context)), instanceTypeAttribute -> { ContainerUtil.addIfNotNull(result, instanceTypeAttribute.getName()); return true; }, context ); } return result; }