boolean (@NotNull PsiScopeProcessor processor, @Nullable PsiElement location) { final PyFunction instanceMethod = PsiTreeUtil.getStubOrPsiParentOfType(location, PyFunction.class); final PyClass containingClass = instanceMethod != null ? instanceMethod.getContainingClass() : null; if (instanceMethod != null && containingClass != null && CompletionUtilCoreImpl.getOriginalElement(containingClass) == this) { for (PyTargetExpression target : getTargetExpressions(instanceMethod)) { if (PyUtil.isInstanceAttribute(target) && !processor.execute(target, ResolveState.initial())) { return false; } } } if (!processInstanceAttributesNotInMethod(processor, instanceMethod, getInstanceAttributes())) return false; if (!processInstanceAttributesNotInMethod(processor, instanceMethod, getFallbackInstanceAttributes())) return false; return true; }