def m2minlineformset_factory(
    parent_model, model, form=RalphAdminForm,
    formset=BaseInlineM2MFormset, fk_name=None,
    fields=None, exclude=None, extra=3, can_order=False,
    can_delete=True, max_num=None, formfield_callback=None,
    widgets=None, validate_max=False, localized_fields=None,
    labels=None, help_texts=None, error_messages=None,
    min_num=None, validate_min=False
):
    # TODO: use fk_name
    m2m = get_m2m(parent_model, model)
    fk = get_foreign_key_for_m2m(parent_model, m2m)
    kwargs = {
        'form': form,
        'formfield_callback': formfield_callback,
        'formset': formset,
        'extra': extra,
        'can_delete': can_delete,
        'can_order': can_order,
        'fields': fields,
        'exclude': exclude,
        'min_num': min_num,
        'max_num': max_num,
        'widgets': widgets,
        'validate_min': validate_min,
        'validate_max': validate_max,
        'localized_fields': localized_fields,
        'labels': labels,
        'help_texts': help_texts,
        'error_messages': error_messages,
    }
    FormSet = modelformset_factory(model, **kwargs)
    FormSet.m2m = m2m
    FormSet.fk = fk
    return FormSet
Clear local keep
dataset/ETHPy150Open allegro/ralph/src/ralph/admin/m2m.py/m2minlineformset_factory--crossover with--dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/proto/stacking.py/KeepStack.clearLocalKeep