boolean (@NotNull final PyClassType type, PsiReference reference, @NotNull final String name, TypeEvalContext typeEvalContext) { final List<PyClassType> types = new ArrayList<>(Collections.singletonList(type)); types.addAll(FluentIterable.from(type.getAncestorTypes(typeEvalContext)).filter(PyClassType.class).toList()); for (final PyClassType typeToCheck : types) { for (PyClassMembersProvider provider : PyClassMembersProvider.EP_NAME.getExtensionList()) { final Collection<PyCustomMember> resolveResult = provider.getMembers(typeToCheck, reference.getElement(), typeEvalContext); for (PyCustomMember member : resolveResult) { if (member.getName().equals(name)) return true; } } } return false; }