Added widget_type annotation to BoundField (#855)

* Add widget_type annotation to BoundField

See https://github.com/django/django/blob/main/django/forms/boundfield.py#L283

* Tweaked annotation to be `AnyStr`, not `str`

* Reverted to use `str` as return type
This commit is contained in:
Ethan Corey
2022-02-22 14:47:43 -05:00
committed by GitHub
parent 850df1655a
commit 104012b817

View File

@@ -47,6 +47,8 @@ class BoundField:
def build_widget_attrs(
self, attrs: Dict[str, str], widget: Optional[Widget] = ...
) -> Dict[str, Union[bool, str]]: ...
@property
def widget_type(self) -> str: ...
class BoundWidget:
parent_widget: Widget = ...