summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorMike Edmunds <medmunds@gmail.com>2025-07-22 20:44:22 -0700
committernessita <124304+nessita@users.noreply.github.com>2025-07-23 20:17:55 -0300
commit78298b51629e14c0e472898b635bc819d47b7f27 (patch)
treefc3302ebacba36e9b06d12f90b557c9314b9be1f /django/forms
parent69a93a88edb56ba47f624dac7a21aacc47ea474f (diff)
Refs #36500 -- Corrected rewrapped long lines fixed via a script.
Manually reformatted some comments and docstrings where autofix_w505.py changed the meaning of the formatting.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/boundfield.py8
-rw-r--r--django/forms/fields.py9
2 files changed, 8 insertions, 9 deletions
diff --git a/django/forms/boundfield.py b/django/forms/boundfield.py
index f6b721c72a..97559fe286 100644
--- a/django/forms/boundfield.py
+++ b/django/forms/boundfield.py
@@ -114,8 +114,8 @@ class BoundField(RenderableFieldMixin):
def as_text(self, attrs=None, **kwargs):
"""
- Return a string of HTML for representing this as an <input
- type="text">.
+ Return a string of HTML for representing this as an
+ <input type="text">.
"""
return self.as_widget(TextInput(), attrs, **kwargs)
@@ -125,8 +125,8 @@ class BoundField(RenderableFieldMixin):
def as_hidden(self, attrs=None, **kwargs):
"""
- Return a string of HTML for representing this as an <input
- type="hidden">.
+ Return a string of HTML for representing this as an
+ <input type="hidden">.
"""
return self.as_widget(self.field.hidden_widget(), attrs, **kwargs)
diff --git a/django/forms/fields.py b/django/forms/fields.py
index 182d63c9b4..a5eee6831c 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -127,17 +127,16 @@ class Field:
# error_messages -- An optional dictionary to override the default
# messages that the field will raise.
# show_hidden_initial -- Boolean that specifies if it is needed to
- # render a
- # hidden widget with initial value after widget.
+ # render a hidden widget with initial value
+ # after widget.
# validators -- List of additional validators to use
# localize -- Boolean that specifies if the field should be localized.
# disabled -- Boolean that specifies whether the field is disabled,
- # that
- # is its widget is shown in the form but not editable.
+ # that is its widget is shown in the form but not editable.
# label_suffix -- Suffix to be added to the label. Overrides
# form's label_suffix.
# bound_field_class -- BoundField class to use in
- # Field.get_bound_field.
+ # Field.get_bound_field.
self.required, self.label, self.initial = required, label, initial
self.show_hidden_initial = show_hidden_initial
self.help_text = help_text