boolean (@NotNull final PySuperMethodsSearch.SearchParameters queryParameters, @NotNull final Processor<? super PsiElement> consumer) { final PyFunction func = queryParameters.getDerivedMethod(); final String name = func.getName(); final PyClass containingClass = func.getContainingClass(); final TypeEvalContext context = queryParameters.getContext(); if (name != null && containingClass != null) { for (PyClass superClass : containingClass.getAncestorClasses(context)) { PyFunction superMethod = superClass.findMethodByName(name, false, context); final Property property = func.getProperty(); final Property superProperty = superMethod == null ? null : superMethod.getProperty(); if (property != null && superProperty != null) { final AccessDirection direction = PyUtil.getPropertyAccessDirection(func); final PyCallable callable = superProperty.getByDirection(direction).valueOrNull(); superMethod = (callable instanceof PyFunction) ? (PyFunction)callable : null; } if (superMethod != null) { boolean consumerWantsMore = consumer.process(superMethod); if (!queryParameters.isDeepSearch() || !consumerWantsMore) { return false; } } } } return true; }