mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 14:31:56 +08:00
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:
@@ -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 = ...
|
||||
|
||||
Reference in New Issue
Block a user