We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01f30fb commit a7bd44eCopy full SHA for a7bd44e
object_mother_pattern/models/base_mother.py
@@ -60,8 +60,7 @@ def __init_subclass__(cls, **kwargs: Any) -> None:
60
if not isclass(object=mother_type) and get_origin(tp=mother_type) is None:
61
raise TypeError(f'BaseMother[...] <<<{mother_type}>>> must be a type. Got <<<{type(mother_type).__name__}>>> type.') # noqa: E501 # fmt: skip
62
63
- if HAS_VALUE_OBJECTS and issubclass(mother_type, ValueObject):
64
- print('Detected ValueObject subclass as mother type.') # pragma: no cover
+ if HAS_VALUE_OBJECTS and isclass(object=mother_type) and issubclass(mother_type, ValueObject):
65
mother_type = mother_type.type()
66
67
cls._type = mother_type
0 commit comments