mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-05-17 13:59:46 +08:00
Fix the type of form.Field.widget (#321)
The `widget` class attribute of `form.Field` expects a `Widget` class, not an instance of `Widget`. See: https://docs.djangoproject.com/en/3.0/ref/forms/fields/#widget Also usages at: https://github.com/django/django/blob/3259983f569151232d8e3b0c3d0de3a858c2b265/django/forms/fields.py#L46
This commit is contained in:
@@ -14,7 +14,7 @@ class Field:
|
|||||||
initial: Any
|
initial: Any
|
||||||
label: Optional[str]
|
label: Optional[str]
|
||||||
required: bool
|
required: bool
|
||||||
widget: Widget = ...
|
widget: Type[Widget] = ...
|
||||||
hidden_widget: Any = ...
|
hidden_widget: Any = ...
|
||||||
default_validators: Any = ...
|
default_validators: Any = ...
|
||||||
default_error_messages: Any = ...
|
default_error_messages: Any = ...
|
||||||
|
|||||||
Reference in New Issue
Block a user