@@ -226,6 +226,7 @@ from dataclasses import field
226226
227227@dataclass_transform (kw_only_default = True )
228228def create_model (* , kw_only : bool = True ): ...
229+
229230@create_model ()
230231class A :
231232 name: str
@@ -282,6 +283,7 @@ from typing import dataclass_transform
282283
283284@dataclass_transform (frozen_default = True )
284285def create_model (* , frozen : bool = True ): ...
286+
285287@create_model ()
286288class ImmutableModel :
287289 name: str
@@ -339,6 +341,7 @@ from typing import dataclass_transform
339341
340342@dataclass_transform (eq_default = True , order_default = False , kw_only_default = True , frozen_default = True )
341343def create_model (* , eq : bool = True , order : bool = False , kw_only : bool = True , frozen : bool = True ): ...
344+
342345@create_model (eq = False , order = True , kw_only = False , frozen = False )
343346class OverridesAllParametersModel :
344347 name: str
@@ -367,6 +370,7 @@ from typing import dataclass_transform
367370
368371@dataclass_transform (frozen_default = True )
369372def default_frozen_model (* , frozen : bool = True , order : bool = False ): ...
373+
370374@default_frozen_model ()
371375class Frozen :
372376 name: str
@@ -466,6 +470,7 @@ from typing import dataclass_transform
466470
467471@dataclass_transform (frozen_default = True )
468472def frozen_model (* , frozen : bool = True ): ...
473+
469474@frozen_model ()
470475class FrozenWithOverrides :
471476 x: int
@@ -497,6 +502,7 @@ from typing import dataclass_transform
497502
498503@dataclass_transform ()
499504def ordered_model (* , order : bool = False ): ...
505+
500506@ordered_model (order = True )
501507class OrderedWithOverrides :
502508 x: int
@@ -652,6 +658,7 @@ reveal_type(alice.age) # revealed: int | None
652658from typing_extensions import dataclass_transform, Any
653659
654660def fancy_field (* , init : bool = True , kw_only : bool = False , alias : str | None = None ) -> Any: ...
661+
655662@dataclass_transform (field_specifiers = (fancy_field,))
656663class FancyMeta (type ):
657664 def __new__ (cls , name , bases , namespace ):
@@ -680,6 +687,7 @@ reveal_type(alice.age) # revealed: int | None
680687from typing_extensions import dataclass_transform, Any
681688
682689def fancy_field (* , init : bool = True , kw_only : bool = False , alias : str | None = None ) -> Any: ...
690+
683691@dataclass_transform (field_specifiers = (fancy_field,))
684692class FancyBase :
685693 def __init_subclass__ (cls ):
@@ -763,6 +771,7 @@ from typing import Any
763771from typing_extensions import dataclass_transform
764772
765773def field (** kwargs : Any) -> Any: ...
774+
766775@dataclass_transform (field_specifiers = (field,))
767776class ModelMeta (type ): ...
768777
@@ -790,6 +799,7 @@ from typing import Any
790799from typing_extensions import dataclass_transform
791800
792801def field (** kwargs : Any) -> Any: ...
802+
793803@dataclass_transform (field_specifiers = (field,))
794804class ModelBase : ...
795805
@@ -1094,6 +1104,7 @@ class InvalidKWOnlyDefaultModel:
10941104from typing_extensions import Any, dataclass_transform
10951105
10961106def field (* , init : bool = True , kw_only : bool = False , default : Any = ... ) -> Any: ...
1107+
10971108@dataclass_transform (field_specifiers = (field,))
10981109class ModelMeta (type ): ...
10991110
@@ -1140,6 +1151,7 @@ class InvalidKWOnlyDefaultModel(KWOnlyDefaultModelBase):
11401151from typing_extensions import Any, dataclass_transform
11411152
11421153def field (* , init : bool = True , kw_only : bool = False , default : Any = ... ) -> Any: ...
1154+
11431155@dataclass_transform (field_specifiers = (field,))
11441156class ModelBase :
11451157 def __init_subclass__ (cls ):
0 commit comments