Re: modelform_factory and __module__ name

2022-08-29 Thread Silvio
That helps, thanks. I don't think it's worth it either, because, ultimately, it'll still be "wrong". The right __module__ is wherever you called modelform_factory from. The perils of meta programming... On Monday, August 29, 2022 at 11:33:50 AM UTC+2 j.bre...@netzkolchose.de wrote: > Looks to

Re: modelform_factory and __module__ name

2022-08-29 Thread Jörg Breitbart
Looks to me like being carried forward from the very first metaclass ``MediaDefiningClass``, which happens to be defined in django.forms.widgets. Should be fixable by explicitly adding a __module__ notion to type(). Not sure though if it is worth additional code just for the sake of pretty __m

modelform_factory and __module__ name

2022-08-29 Thread Silvio
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