Skip to content

Commit

Permalink
Fix whatever typing change causes pyright to think frozen classes are…
Browse files Browse the repository at this point in the history
…n't frozen.
  • Loading branch information
Julian committed Apr 24, 2023
1 parent 186e4d1 commit 7579ff2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions referencing/_attrs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ _T = TypeVar("_T")

def __dataclass_transform__(
*,
eq_default: bool = ...,
order_default: bool = ...,
kw_only_default: bool = ...,
frozen_default: bool = False,
field_descriptors: tuple[Union[type, Callable[..., Any]], ...] = ...,
) -> Callable[[_T], _T]: ...
@__dataclass_transform__(field_descriptors=(attrib, field))
def define(cls: type[_T]) -> type[_T]: ...

frozen = define
@__dataclass_transform__(
frozen_default=True,
field_descriptors=(attrib, field),
)
def frozen(cls: type[_T]) -> type[_T]: ...

0 comments on commit 7579ff2

Please sign in to comment.