From 4a4b776bf46d5b80e35ead1d72174007548121dc Mon Sep 17 00:00:00 2001 From: q0w <43147888+q0w@users.noreply.github.com> Date: Sun, 25 Feb 2024 11:26:40 +0300 Subject: [PATCH] Rename save_existing arg instance to obj (#1971) --- django-stubs/forms/models.pyi | 2 +- scripts/stubtest/allowlist_todo_django50.txt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/django-stubs/forms/models.pyi b/django-stubs/forms/models.pyi index 86f37d24d..4f7cdf0ae 100644 --- a/django-stubs/forms/models.pyi +++ b/django-stubs/forms/models.pyi @@ -126,7 +126,7 @@ class BaseModelFormSet(Generic[_M, _ModelFormT], BaseFormSet[_ModelFormT]): def initial_form_count(self) -> int: ... def get_queryset(self) -> _IndexableCollection[_M]: ... def save_new(self, form: _ModelFormT, commit: bool = ...) -> _M: ... - def save_existing(self, form: _ModelFormT, instance: _M, commit: bool = ...) -> _M: ... + def save_existing(self, form: _ModelFormT, obj: _M, commit: bool = ...) -> _M: ... def delete_existing(self, obj: _M, commit: bool = ...) -> None: ... saved_forms: list[_ModelFormT] def save_m2m(self) -> None: ... diff --git a/scripts/stubtest/allowlist_todo_django50.txt b/scripts/stubtest/allowlist_todo_django50.txt index 479d0e871..5981ff9f2 100644 --- a/scripts/stubtest/allowlist_todo_django50.txt +++ b/scripts/stubtest/allowlist_todo_django50.txt @@ -66,7 +66,6 @@ django.contrib.gis.db.models.Q.identity django.contrib.gis.db.models.Value.allowed_default django.contrib.gis.db.models.When.allowed_default django.contrib.gis.forms.BaseForm._html_output -django.contrib.gis.forms.BaseModelFormSet.save_existing django.contrib.gis.forms.BoundField.get_context django.contrib.gis.forms.BoundField.template_name django.contrib.gis.forms.ClearableFileInput.checked @@ -218,7 +217,6 @@ django.db.models.sql.query.Query.join django.db.models.sql.query.Query.resolve_lookup_value django.db.models.sql.query.Query.setup_joins django.forms.BaseForm._html_output -django.forms.BaseModelFormSet.save_existing django.forms.BoundField.get_context django.forms.BoundField.template_name django.forms.ClearableFileInput.checked @@ -229,7 +227,6 @@ django.forms.fields.CallableChoiceIterator django.forms.fields.Field.__init__ django.forms.fields_for_model django.forms.forms.BaseForm._html_output -django.forms.models.BaseModelFormSet.save_existing django.forms.models.fields_for_model django.forms.renderers.BaseRenderer.field_template_name django.forms.renderers.Jinja2DivFormRenderer.__init__