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:
Brian Helba
2020-02-07 04:42:02 -05:00
committed by GitHub
parent 2489bb9b04
commit d96aee7a8b

View File

@@ -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 = ...