Skip to content

Commit

Permalink
fix: handle case with instantiable container type
Browse files Browse the repository at this point in the history
  • Loading branch information
guacs committed Mar 2, 2024
1 parent 63be691 commit e41aedc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polyfactory/value_generators/complex_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def handle_collection_type(field_meta: FieldMeta, container_type: type, factory:
:returns: A built result.
"""

if PY_38:
if PY_38 and container_type in INSTANTIABLE_TYPE_MAPPING:
container_type = INSTANTIABLE_TYPE_MAPPING[container_type] # type: ignore[assignment]

container = container_type()
Expand Down

0 comments on commit e41aedc

Please sign in to comment.