class Classmaker(DataClass): backend_spec = field() class_template = field() class_config = field() def __call__(self): return self.class_template( base=self.backend_spec.base, decorate=self.backend_spec.decorator(self.class_config), field=self.backend_spec.field, type_config=self.backend_spec.type_args(self.class_config), )
class Example5(Example4): six: int = field() # type: ignore
class Example3(Example2): four: int = field() # type: ignore
class Example4(Example3): five: int = field() # type: ignore
class Example2(Example): three: int = field() # type: ignore
class Example(base, **type_config): # type: ignore one: int = field() # type: ignore two: int = field() # type: ignore
class Example(DataClass): name: str = field() age: int = field()
class Priorized(DataClass, order=True): # type: ignore priority: int = field(order=True) name: str = field(order=False)
class Point(DataClass, eq=True): # type: ignore x: int = field() y: int = field()