Skip to content

Commit 150f3e6

Browse files
authored
make(map_any_value_to_trait_value): to use in core (#211)
1 parent 1962239 commit 150f3e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flag_engine/identities/traits/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
_UnconstrainedTraitValue = Union[None, int, float, bool, str]
1212

1313

14-
def _map_any_value_to_trait_value(value: Any) -> _UnconstrainedTraitValue:
14+
def map_any_value_to_trait_value(value: Any) -> _UnconstrainedTraitValue:
1515
"""
1616
Try to coerce a value of arbitrary type to a trait value type.
1717
Union member-specific constraints, such as max string value length, are ignored here.
@@ -56,5 +56,5 @@ def _is_trait_value(value: Any) -> TypeGuard[_UnconstrainedTraitValue]:
5656
int,
5757
Annotated[str, StringConstraints(max_length=TRAIT_STRING_VALUE_MAX_LENGTH)],
5858
],
59-
BeforeValidator(_map_any_value_to_trait_value),
59+
BeforeValidator(map_any_value_to_trait_value),
6060
]

0 commit comments

Comments
 (0)