Hi all,
Not quite sure if this is the right forum, but it concerns Django itself and static analysis of it.
I'm working heavily on static analysis of the Django code base, including mypy and Django-stubs.
For the life of me, I cannot figure out why the class returned by modelform_factory has "django.forms.widgets" as its __module__. I can see it having "django.forms.models" or the like, but the former makes no sense.
It's not a huge issue, as ultimately dynamic classes will have localized module names but it's been bugging me for a while.
Give it a try in a plain Django installation: model passed to modelform_factory and inspect the module name.
Best,
Silvio