Skip to content

Commit

Permalink
Fix dataclass_transform import
Browse files Browse the repository at this point in the history
  • Loading branch information
rnag committed Nov 27, 2024
1 parent eb19dca commit d4d175d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataclass_wizard/environ/wizard.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import logging
from dataclasses import MISSING, dataclass, fields
from typing import Callable, dataclass_transform
from typing import Callable

from .dumpers import asdict
from .lookups import Env, lookup_exact, clean
Expand All @@ -15,7 +15,7 @@
from ..errors import ExtraData, MissingVars, ParseError, type_name
from ..loaders import get_loader
from ..models import Extras, JSONField
from ..type_def import EnvFileType, ExplicitNull, JSONObject
from ..type_def import EnvFileType, ExplicitNull, JSONObject, dataclass_transform
from ..utils.function_builder import FunctionBuilder


Expand Down
3 changes: 3 additions & 0 deletions dataclass_wizard/type_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'LT',
'LSQ',
'FREF',
'dataclass_transform',
]

from collections import deque
Expand Down Expand Up @@ -149,9 +150,11 @@
if PY311_OR_ABOVE: # pragma: no cover
from typing import Required as PyRequired
from typing import NotRequired as PyNotRequired
from typing import dataclass_transform
else:
from typing_extensions import Required as PyRequired
from typing_extensions import NotRequired as PyNotRequired
from typing_extensions import dataclass_transform


# Forward references can be either strings or explicit `ForwardRef` objects.
Expand Down

0 comments on commit d4d175d

Please sign in to comment.