Skip to content

Commit 3feba4a

Browse files
committed
Fix
1 parent 99d9263 commit 3feba4a

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

src/cattrs/preconf/json.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@
88

99
from .._compat import Counter
1010
from ..converters import BaseConverter, Converter
11+
from ..fns import identity
1112
from ..literals import is_literal_containing_enums
1213
from ..strategies import configure_union_passthrough
13-
from . import (
14-
is_primitive_enum,
15-
literals_with_enums_unstructure_factory,
16-
primitive_enum_unstructure_factory,
17-
wrap,
18-
)
14+
from . import is_primitive_enum, literals_with_enums_unstructure_factory, wrap
1915

2016
__all__ = ["JsonConverter", "configure_converter", "make_converter"]
2117

@@ -56,9 +52,7 @@ def configure_converter(converter: BaseConverter) -> None:
5652
converter.register_unstructure_hook_factory(
5753
is_literal_containing_enums, literals_with_enums_unstructure_factory
5854
)
59-
converter.register_unstructure_hook_factory(
60-
is_primitive_enum, primitive_enum_unstructure_factory
61-
)
55+
converter.register_unstructure_hook_factory(is_primitive_enum, identity)
6256
configure_union_passthrough(Union[str, bool, int, float, None], converter)
6357

6458

0 commit comments

Comments
 (0)