PyVariadicType (@NotNull PsiElement element, @NotNull TypeEvalContext context) { // TODO Add support for Unpacked here if (!(element instanceof PyStarExpression starExpression)) return null; var typeHint = starExpression.getExpression(); if (!(typeHint instanceof PyReferenceExpression) && !(typeHint instanceof PySubscriptionExpression)) return null; var typeRef = getType(typeHint, context); if (typeRef == null) return null; var expressionType = typeRef.get(); if (expressionType instanceof PyTupleType tupleType) { return new PyUnpackedTupleTypeImpl(tupleType.getElementTypes(), tupleType.isHomogeneous()); } if (expressionType instanceof PyTypeVarTupleType typeVarTupleType) { return typeVarTupleType; } return null; }