diff --git a/django-stubs/contrib/admin/widgets.pyi b/django-stubs/contrib/admin/widgets.pyi index 49d940aa8..cf27e965e 100644 --- a/django-stubs/contrib/admin/widgets.pyi +++ b/django-stubs/contrib/admin/widgets.pyi @@ -6,7 +6,7 @@ from django.contrib.admin.sites import AdminSite from django.core.files.base import File from django.db.models.fields.reverse_related import ManyToManyRel, ManyToOneRel from django.forms.models import ModelChoiceIterator -from django.forms.widgets import _OptAttrs +from django.forms.widgets import ChoiceWidget, _OptAttrs from django.utils.choices import _Choices from django.utils.functional import _StrOrPromise @@ -76,7 +76,7 @@ class ManyToManyRawIdWidget(ForeignKeyRawIdWidget): class RelatedFieldWidgetWrapper(forms.Widget): template_name: str - widget: forms.ChoiceWidget + widget: ChoiceWidget rel: ManyToOneRel can_add_related: bool can_change_related: bool @@ -85,7 +85,7 @@ class RelatedFieldWidgetWrapper(forms.Widget): admin_site: AdminSite def __init__( self, - widget: forms.ChoiceWidget, + widget: ChoiceWidget, rel: ManyToOneRel, admin_site: AdminSite, can_add_related: bool | None = ..., diff --git a/django-stubs/forms/__init__.pyi b/django-stubs/forms/__init__.pyi index 463615f6c..cd717d067 100644 --- a/django-stubs/forms/__init__.pyi +++ b/django-stubs/forms/__init__.pyi @@ -52,7 +52,6 @@ from .models import modelform_factory as modelform_factory from .models import modelformset_factory as modelformset_factory from .widgets import CheckboxInput as CheckboxInput from .widgets import CheckboxSelectMultiple as CheckboxSelectMultiple -from .widgets import ChoiceWidget as ChoiceWidget from .widgets import ClearableFileInput as ClearableFileInput from .widgets import DateInput as DateInput from .widgets import DateTimeBaseInput as DateTimeBaseInput diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index 63dade198..0fa72f42d 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -408,7 +408,6 @@ django.contrib.gis.forms.BaseModelFormSet.model django.contrib.gis.forms.BaseModelFormSet.save_m2m django.contrib.gis.forms.BoundWidget django.contrib.gis.forms.ChoiceField.__deepcopy__ -django.contrib.gis.forms.ChoiceWidget django.contrib.gis.forms.DateTimeBaseInput django.contrib.gis.forms.EmailInput.__slotnames__ django.contrib.gis.forms.Field.__deepcopy__ @@ -1263,7 +1262,6 @@ django.forms.BaseModelFormSet.model django.forms.BaseModelFormSet.save_m2m django.forms.BoundWidget django.forms.ChoiceField.__deepcopy__ -django.forms.ChoiceWidget django.forms.DateTimeBaseInput django.forms.EmailInput.__slotnames__ django.forms.Field.__deepcopy__