__init__.py 308 B

1234567891011121314
  1. import dataclasses
  2. from typing import Type, TypeVar
  3. from typing_extensions import dataclass_transform
  4. _T = TypeVar('_T')
  5. @dataclass_transform(
  6. field_specifiers=(dataclasses.Field, dataclasses.field),
  7. )
  8. def model(cls: Type[_T]) -> Type[_T]:
  9. return dataclasses.dataclass(eq=False, repr=False)(cls)