Skip to content

Commit

Permalink
Fix dataclass_transform import
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Feb 2, 2024
1 parent 4ba45bf commit b83f139
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/attrs/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import sys

from typing import (
Any,
Callable,
Mapping,
Sequence,
dataclass_transform,
overload,
TypeVar,
)
Expand Down Expand Up @@ -39,6 +40,11 @@ from attr import validate as validate
from attr import validators as validators
from attr import attrib, asdict as asdict, astuple as astuple

if sys.version_info >= (3, 11):
from typing import dataclass_transform
else:
from typing_extensions import dataclass_transform

_T = TypeVar("_T")
_C = TypeVar("_C", bound=type)

Expand Down

0 comments on commit b83f139

Please sign in to comment.