mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-07 12:44:38 +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:
1 parent
2489bb9b04
commit
d96aee7a8b
1 file changed
+1
-1
@@ -14,7 +14,7 @@ class Field:
|
||||
initial: Any
|
||||
label: Optional[str]
|
||||
required: bool
|
||||
widget: Widget = ...
|
||||
widget: Type[Widget] = ...
|
||||
hidden_widget: Any = ...
|
||||
default_validators: Any = ...
|
||||
default_error_messages: Any = ...
|
||||
|
||||
Reference in new issue
Block a user