List<PyTargetExpression> (@NotNull PyTargetExpression target, @NotNull TypeEvalContext context) { assert target.getContainingClass() != null; assert target.getName() != null; final PyClassTypeImpl classType = new PyClassTypeImpl(target.getContainingClass(), true); final PyResolveContext resolveContext = PyResolveContext.defaultContext(context); final List<? extends RatedResolveResult> classAttrs = classType.resolveMember(target.getName(), target, AccessDirection.READ, resolveContext, true); if (classAttrs == null) { return Collections.emptyList(); } return StreamEx.of(classAttrs) .map(RatedResolveResult::getElement) .select(PyTargetExpression.class) .filter(x -> ScopeUtil.getScopeOwner(x) instanceof PyClass) .toList(); }