from typing import Generic, TypeVarTuple, Unpack Shape = TypeVarTuple('Shape') class C(Generic[Unpack [Shape]]): pass