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.boundfield and django.forms.utils #2118

Merged
merged 10 commits into from
May 3, 2024
6 changes: 5 additions & 1 deletion django-stubs/forms/boundfield.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from django.forms.utils import ErrorList
from django.forms.widgets import Widget
from django.utils.functional import _StrOrPromise, cached_property
from django.utils.safestring import SafeString
from typing_extensions import TypeAlias
from typing_extensions import Self, TypeAlias

_AttrsT: TypeAlias = dict[str, str | bool]

Expand All @@ -21,6 +21,7 @@ class BoundField:
html_initial_id: str
label: _StrOrPromise
help_text: _StrOrPromise
renderer: BaseRenderer
def __init__(self, form: BaseForm, field: Field, name: str) -> None: ...
@cached_property
def subwidgets(self) -> list[BoundWidget]: ...
Expand All @@ -33,6 +34,9 @@ class BoundField:
def __getitem__(self, idx: slice) -> list[BoundWidget]: ...
@property
def errors(self) -> ErrorList: ...
@property
def template_name(self) -> str: ...
def get_context(self) -> dict[str, type[Self]]: ...
JaeHyuckSa marked this conversation as resolved.
Show resolved Hide resolved
def as_widget(
self, widget: Widget | None = ..., attrs: _AttrsT | None = ..., only_initial: bool = ...
) -> SafeString: ...
Expand Down
6 changes: 0 additions & 6 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ django.contrib.gis.db.models.Prefetch.get_current_querysets
django.contrib.gis.db.models.Q.identity
django.contrib.gis.db.models.When.allowed_default
django.contrib.gis.forms.BaseForm._html_output
django.contrib.gis.forms.BoundField.get_context
django.contrib.gis.forms.BoundField.template_name
django.contrib.gis.forms.ClearableFileInput.checked
django.contrib.gis.forms.fields_for_model
django.contrib.gis.geos.prototypes.io.DEFAULT_TRIM_VALUE
Expand Down Expand Up @@ -93,11 +91,7 @@ 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.BoundField.get_context
django.forms.BoundField.template_name
django.forms.ClearableFileInput.checked
django.forms.boundfield.BoundField.get_context
django.forms.boundfield.BoundField.template_name
django.forms.fields_for_model
django.forms.forms.BaseForm._html_output
django.forms.models.fields_for_model
Expand Down
Loading