If __set_as_default_factory_for_type__ is set to True on a custom base factory so that all the subclasses factories inherit that value, then an AttributeError is raised.
URL to code causing the issue
No response
MCVE
from polyfactory.factories import DataclassFactory
from polyfactory.factories.base import T
class CustomDataclassBaseFactory(DataclassFactory[T]):
__is_base_factory__ = True
__set_as_default_factory_for_type__ = True
Steps to reproduce
Run the MCVE.
Screenshots
No response
Logs
No response
Release Version
2.13.0
Platform
[ ] Linux
[ ] Mac
[ ] Windows
[ ] Other (Please specify in the description above)
Description
If
__set_as_default_factory_for_type__
is set toTrue
on a custom base factory so that all the subclasses factories inherit that value, then anAttributeError
is raised.URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
No response
Logs
No response
Release Version
2.13.0
Platform