from typing import TypeVarTuple, Unpack Shape = TypeVarTuple("Shape") class Foo(Unpack[Shape]): pass