Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have made things!
default_renderer
may be a renderer class, instance, orNone
: https://docs.djangoproject.com/en/4.0/ref/forms/api/#django.forms.Form.default_renderer / https://github.com/django/django/blob/d8b437b1fbe3bf54822833bea5e19d2142cf3e1f/django/forms/forms.py#L120-L129field_order
should be a list/sequence of field names, orNone
: https://docs.djangoproject.com/en/4.0/ref/forms/api/#django.forms.Form.field_order / https://github.com/django/django/blob/d8b437b1fbe3bf54822833bea5e19d2142cf3e1f/django/forms/forms.py#L131-L151cleaned_data
should be a dict/mapping of field names to values, as returned byclean()
: https://docs.djangoproject.com/en/4.0/ref/forms/api/#django.forms.Form.cleaned_data . I similarly updatedclean()
to allow arbitrary mappings, since it may be legitimate to use some special mapping class.clean()
does not need to return a mapping - https://docs.djangoproject.com/en/4.0/ref/forms/validation/#validating-fields-with-clean : “If your form inherits another that doesn’t return acleaned_data
dictionary in itsclean()
method (doing so is optional)...”is_multipart
returns abool
: https://docs.djangoproject.com/en/4.0/ref/forms/api/#django.forms.Form.is_multiparthidden_fields
andvisible_fields
aren't documented, but they return lists ofBoundField
instances: https://github.com/django/django/blob/d8b437b1fbe3bf54822833bea5e19d2142cf3e1f/django/forms/forms.py#L501-L513Related issues
No related issues - just the above research.
Thanks for maintaining django-stubs 😎