Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0: Update django.forms.formsets #2145

Merged
merged 2 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions django-stubs/forms/formsets.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ from typing import Any, Generic, TypeVar

from django.db.models.fields import _ErrorMessagesDict
from django.forms.forms import BaseForm, Form
from django.forms.renderers import BaseRenderer
from django.forms.utils import ErrorList, RenderableFormMixin, _DataT, _FilesT
from django.forms.widgets import Media, Widget
from django.forms.widgets import Media, MediaDefiningClass, Widget
from django.utils.functional import cached_property

TOTAL_FORM_COUNT: str
Expand Down Expand Up @@ -44,8 +45,8 @@ class BaseFormSet(Generic[_F], Sized, RenderableFormMixin):
initial: Sequence[Mapping[str, Any]] | None
form_kwargs: dict[str, Any]
error_class: type[ErrorList]
deletion_widget: type[Widget]
ordering_widget: type[Widget]
deletion_widget: MediaDefiningClass
ordering_widget: MediaDefiningClass
default_error_messages: _ErrorMessagesDict
template_name_div: str
template_name_p: str
Expand All @@ -61,6 +62,8 @@ class BaseFormSet(Generic[_F], Sized, RenderableFormMixin):
error_class: type[ErrorList] = ...,
form_kwargs: dict[str, Any] | None = ...,
error_messages: Mapping[str, str] | None = ...,
form_renderer: BaseRenderer = ...,
renderer: BaseRenderer = ...,
) -> None: ...
def __iter__(self) -> Iterator[_F]: ...
def __getitem__(self, index: int) -> _F: ...
Expand Down
6 changes: 0 additions & 6 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,6 @@ django.contrib.gis.db.models.lookups.RasterBandTransform.as_sql
django.contrib.gis.forms.ALL_FIELDS
django.contrib.gis.forms.BaseForm.__init__
django.contrib.gis.forms.BaseFormSet.__init__
django.contrib.gis.forms.BaseFormSet.deletion_widget
django.contrib.gis.forms.BaseFormSet.ordering_widget
django.contrib.gis.forms.BaseModelForm.__init__
django.contrib.gis.forms.BaseModelForm.save_m2m
django.contrib.gis.forms.BaseModelFormSet.model
Expand Down Expand Up @@ -1310,8 +1308,6 @@ django.db.utils.DatabaseErrorWrapper.__call__
django.forms.ALL_FIELDS
django.forms.BaseForm.__init__
django.forms.BaseFormSet.__init__
django.forms.BaseFormSet.deletion_widget
django.forms.BaseFormSet.ordering_widget
django.forms.BaseModelForm.__init__
django.forms.BaseModelForm.save_m2m
django.forms.BaseModelFormSet.model
Expand Down Expand Up @@ -1359,8 +1355,6 @@ django.forms.forms.BaseForm.__init__
django.forms.forms.DeclarativeFieldsMetaclass.__new__
django.forms.formset_factory
django.forms.formsets.BaseFormSet.__init__
django.forms.formsets.BaseFormSet.deletion_widget
django.forms.formsets.BaseFormSet.ordering_widget
django.forms.formsets.ManagementForm.__init__
django.forms.formsets.formset_factory
django.forms.inlineformset_factory
Expand Down
Loading