
Funnily enough this is something that's actually in the current spec: Example of using dataclass_transform to decorate a metaclass. ```py # Indicate that classes that use this metaclass default to synthesizing # comparison methods. @typing.dataclass_transform(eq_default=True, order_default=True) class ModelMeta(type): def __init_subclass__( cls, *, init: bool = True, frozen: bool = False, eq: bool = True, order: bool = True, ): ... class ModelBase(metaclass=ModelMeta): ... # Example of how this class would be used by code that imports # from this library: class CustomerModel(ModelBase, init=False, frozen=True, eq=False, order=False): id: int name: str ``` To make this actually work you'd need to do something like this (or define __new__ for the metaclass) ```py @typing.dataclass_transform(eq_default=True, order_default=True) class ModelBase(metaclass=ModelMeta): def __init_subclass__( cls, *, init: bool = True, frozen: bool = False, eq: bool = True, order: bool = True, ): ... class CustomerModel(ModelBase, init=False, frozen=True, eq=False, order=False): id: int name: str ```