mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 04:04:26 +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: 3259983f56/django/forms/fields.py (L46)
This commit is contained in:
@@ -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