Skip to content

Commit

Permalink
ChoiceWidget is not exported in django.forms
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jun 8, 2024
1 parent 2d05cfc commit c55bce9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions django-stubs/contrib/admin/widgets.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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 = ...,
Expand Down
1 change: 0 additions & 1 deletion django-stubs/forms/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -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__
Expand Down

0 comments on commit c55bce9

Please sign in to comment.